diff --git a/test/inputs/lomach.torch.reacting.ini b/test/inputs/lomach.torch.reacting.ini new file mode 100644 index 000000000..c0428964f --- /dev/null +++ b/test/inputs/lomach.torch.reacting.ini @@ -0,0 +1,226 @@ +# choice of solver +[solver] +type = cycle-avg-joule-coupled + + +[cycle-avg-joule-coupled] +max-iters = 10 +solve-em-every-n = 50 +axisymmetric = True +input-power = 18000.0 +initial-input-power = 18000.0 +plasma-solver = lomach +fixed-conductivity = False + +[loMach] +axisymmetric = true +mesh = ./meshes/torch-flow-refine.msh +ref_levels = 0 +order = 3 +outputFreq = 10 +timingFreq = 1 +openSystem = True +flow-solver = tomboulides +thermo-solver = reacting-flow +turb-model = algebraic-rans +algebraic-rans/max-mixing-length = 0.01 +algebraic-rans/von-karman = 0.41 +algebraic-rans/filter = True +algebraic-rans/filter-order = 1 + +[loMach/reacting] +eddy-Pr = 100.0 +eddy-Sc = 100.0 +sub-steps = 10 +# linear-solver-verbosity = 1 + +[loMach/tomboulides] +numerical-integ = false + +#[averaging] +#enableContinuation = False +#restartRMS = True +#saveMeanHist = True +#startIter = 2250000 +#sampleFreq = 10 + +[spongeMultiplier] +plane = True +planeNormal = '0 1 0' +planePoint = '0 0.45 0' +planeWidth = 0.01 +planeMult = 10.0 + + +[io] +outdirBase = output-torch +enableRestart = True +restartMode = singleFileReadWrite +#restartFromLTE = True + +# Set bdfOrder = 1 for restart testing purposes +[time] +enableConstantTimestep = True +dt_fixed = 5e-7 +integrator = curlcurl +bdfOrder = 1 +maxSolverIteration = 200 +solverRelTolerance = 1.0e-12 + +[boundaryConditions] +numWalls = 4 # 3 +numInlets = 1 +numOutlets = 1 # 2 + +# NB: patch = 2 is the axis + +[boundaryConditions/wall1] +# Bottom wall +patch = 3 +type = viscous_isothermal +temperature = 300.0 + +[boundaryConditions/wall2] +# Top wall +patch = 7 +type = viscous_isothermal +temperature = 300.0 + +[boundaryConditions/wall3] +# Torch outer wall +patch = 8 +type = viscous_isothermal +temperature = 300.0 + +[boundaryConditions/inlet1] +patch = 4 +type = uniform +velocity = '0.0 0.706' +swirl = 24.0 +temperature = 300.0 + +[boundaryConditions/outlet1] +patch = 6 +type = uniform +pressure = 0.0 + +[boundaryConditions/wall4] +patch = 5 +type = viscous_isothermal +temperature = 300.0 + +#[boundaryConditions/outlet2] +#patch = 5 +#type = uniform +#pressure = 0.0 + + +########################################### +# PLASMA MODELS +########################################### +[plasma_models] +ambipolar = True +two_temperature = False +gas_model = perfect_mixture +chemistry_model = 'mass_action_law' +transport_model = argon_mixture +argon_ternary/third_order_thermal_conductivity = True + +[plasma_models] +radiation_model = net_emission + +[plasma_models/radiation_model/net_emission] +coefficient = tabulated +tabulated/filename = ./rad-data/nec_sample.0.h5 +tabulated/x_log = False +tabulated/f_log = False +tabulated/order = 1 + +[atoms] +numAtoms = 2 + +[atoms/atom1] +name = 'Ar' +mass = 39.948e-3 # [kg/mol] + +[atoms/atom2] +name = 'E' +mass = 5.48579908782496e-7 # [kg/mol] + +[species] +numSpecies = 3 +background_index = 3 + +[species/species1] +name = 'Ar.+1' +composition = '{Ar : 1, E : -1}' +formation_energy = 1520571.3883 # [J/mol] = 15.7596119 eV # Ionization energy (Not sure what the units should be here) +level_degeneracy = 4 +initialMassFraction = 0.0 +perfect_mixture/constant_molar_cv = 1.5 +perfect_mixture/constant_molar_cp = 2.5 + +[species/species2] +name = 'E' +composition = '{E : 1}' +formation_energy = 0.0 +level_degeneracy = 1 +initialMassFraction = 0.0 +initialElectronTemperature = 298.15 +# if gas_model is perfect_mixture, requires heat capacities from input. +# molar heat capacities in unit of universal gas constant. +perfect_mixture/constant_molar_cv = 1.5 +perfect_mixture/constant_molar_cp = 2.5 + +[species/species3] +name = 'Ar' +composition = '{Ar : 1}' +formation_energy = 0.0 +level_degeneracy = 1 +initialMassFraction = 1.0 +perfect_mixture/constant_molar_cv = 1.5 +perfect_mixture/constant_molar_cp = 2.5 + +[reactions] +number_of_reactions = 2 +minimum_chemistry_temperature = 2000.0 + +[reactions/reaction1] +equation = 'Ar + E => Ar.+1 + 2 E' +reaction_energy = 1520571.3883 # [J/mol] +reactant_stoichiometry = '0 1 1' +product_stoichiometry = '1 2 0' +model = arrhenius +arrhenius/A = 74072.331348 #74072.331348 +arrhenius/b = 1.511 +arrhenius/E = 1176329.772504 # [J/mol] +detailed_balance = False + +[reactions/reaction2] +equation = 'Ar.+1 + 2 E => Ar + E' +reaction_energy = -1520571.3883 # [J/mol] +reactant_stoichiometry = '1 2 0' +product_stoichiometry = '0 1 1' +model = arrhenius +arrhenius/A = 34126.47475259143 #34126.47475259143 +arrhenius/b = 0.368 +arrhenius/E = -377725.908714 +detailed_balance = False + +#--------------------------------------- +# Controls for EM-only solver +# mesh = ../mesh/torch-em-coarse2.msh +# order = 3 # FE order (polynomial degree) +#--------------------------------------- +[em] +mesh = ./meshes/torch-em-NEWCOIL.msh +order = 2 # FE order (polynomial degree) +ref_levels = 0 +max_iter = 1000 # max number of iterations +rtol = 1.0e-12 # solver relative tolerance +atol = 1.0e-18 # solver absolute tolerance +top_only = false # run current through top branch only +bot_only = false # run current through bottom branch only +current_amplitude = 4e5 # run 1 of heating # A/m^2 (with reactions +current_frequency = 6e6 # 1/s +permeability = 1.25663706e-6 # m * kg / s^2 / A^2 diff --git a/test/meshes/.gitattributes b/test/meshes/.gitattributes index cb8dc58a0..5010c0d2a 100644 --- a/test/meshes/.gitattributes +++ b/test/meshes/.gitattributes @@ -1,3 +1,4 @@ *.msh filter=lfs diff=lfs merge=lfs -text torch-flow-refine.msh filter=lfs diff=lfs merge=lfs -text torch-em-coarse2.msh filter=lfs diff=lfs merge=lfs -text +torch-em-NEWCOIL.msh filter=lfs diff=lfs merge=lfs -text diff --git a/test/meshes/torch-em-NEWCOIL.msh b/test/meshes/torch-em-NEWCOIL.msh new file mode 100644 index 000000000..b594967bf --- /dev/null +++ b/test/meshes/torch-em-NEWCOIL.msh @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75732b62f574cbf074b0f91c3370f6938afb54cad7304bf53518309a1f7bac97 +size 719262 diff --git a/test/reactFlow-singleRx.test b/test/reactFlow-singleRx.test index c6e2129ff..a6e092ab3 100755 --- a/test/reactFlow-singleRx.test +++ b/test/reactFlow-singleRx.test @@ -4,6 +4,7 @@ TEST="singleReaction" RUNFILE="inputs/input.reactSingleRx.ini" RUNFILE_STIFF="inputs/input.reactStiffRx.ini" +RUNFILE_TORCH="inputs/lomach.torch.reacting.ini" EXE="../src/tps" RESTART="ref_solns/reactSingleRx/restart_output.sol.h5" @@ -13,6 +14,10 @@ setup() { SOLN_FILE_STIFF=restart_output-stiff.sol.h5 REF_FILE_STIFF=ref_solns/reactSingleRx/restart_output-stiff.sol.h5 + + RESTRT_FILE_TORCH=ref_solns/reactSingleRx/restart_output-torch.sol.IC.h5 + SOLN_FILE_TORCH=restart_output-torch.sol.h5 + REF_FILE_TORCH=ref_solns/reactSingleRx/restart_output-torch.sol.10.h5 } @test "[$TEST] check for input file $RUNFILE" { @@ -49,3 +54,24 @@ setup() { h5diff -r --relative=1e-12 $SOLN_FILE_STIFF $REF_FILE_STIFF /species h5diff -r --relative=1e-12 $SOLN_FILE_STIFF $REF_FILE_STIFF /temperature/temperature } + +@test "[$TEST] check for input file $RUNFILE_TORCH" { + test -s $RUNFILE + rm -rf $SOLN_FILE_TORCH + cp $RESTRT_FILE_TORCH $SOLN_FILE_TORCH +} + +@test "[$TEST] run tps with input -> $RUNFILE_TORCH" { + rm -rf output-torch + $EXE --runFile $RUNFILE_TORCH + test -s $SOLN_FILE_TORCH +} + +@test "[$TEST] verify tps output with input -> $RUNFILE_TORCH" { + test -s $SOLN_FILE_TORCH + test -s $REF_FILE_TORCH + h5diff -r --relative=1e-12 $SOLN_FILE_TORCH $REF_FILE_TORCH /velocity + h5diff -r --relative=1e-12 $SOLN_FILE_TORCH $REF_FILE_TORCH /swirl + h5diff -r --relative=1e-12 $SOLN_FILE_TORCH $REF_FILE_TORCH /species + h5diff -r --relative=1e-12 $SOLN_FILE_TORCH $REF_FILE_TORCH /temperature/temperature +} diff --git a/test/ref_solns/reactSingleRx/.gitattributes b/test/ref_solns/reactSingleRx/.gitattributes new file mode 100644 index 000000000..d4c2e512a --- /dev/null +++ b/test/ref_solns/reactSingleRx/.gitattributes @@ -0,0 +1,2 @@ +restart_output-torch.sol.IC.h5 filter=lfs diff=lfs merge=lfs -text +restart_output-torch.sol.10.h5 filter=lfs diff=lfs merge=lfs -text diff --git a/test/ref_solns/reactSingleRx/restart_output-torch.sol.10.h5 b/test/ref_solns/reactSingleRx/restart_output-torch.sol.10.h5 new file mode 100644 index 000000000..368efb511 --- /dev/null +++ b/test/ref_solns/reactSingleRx/restart_output-torch.sol.10.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ed5d2d1caa8c3f19f902fbba7cb2f49452a003f21441e691c647be23f0eeb78 +size 3889904 diff --git a/test/ref_solns/reactSingleRx/restart_output-torch.sol.IC.h5 b/test/ref_solns/reactSingleRx/restart_output-torch.sol.IC.h5 new file mode 100644 index 000000000..5a118bd29 --- /dev/null +++ b/test/ref_solns/reactSingleRx/restart_output-torch.sol.IC.h5 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9de75a62314bd600827908ed60a8873b5880f15d2583c9056889e45841981c4b +size 3889904