-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composition verification for external sources #443
Merged
baperry2
merged 24 commits into
AMReX-Combustion:development
from
dmontgomeryNREL:composition-test
Dec 17, 2024
Merged
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0074f9c
Add a test for the composition of the gas with external forcing
dmontgomeryNREL 08edad4
Update README.md
dmontgomeryNREL 6d52dc5
Merge branch 'AMReX-Combustion:development' into composition-test
dmontgomeryNREL eb2d108
add input file for composition test and analysis scripts
dmontgomeryNREL d62fdd3
update test to require fewer time steps, pass old_time into external …
dmontgomeryNREL 837804a
Added add_test_rt to CMakeLists
dmontgomeryNREL b2ca739
formatting
dmontgomeryNREL 344b4c7
ensure temporal data is numeric for ubuntu test
dmontgomeryNREL 1033f76
debug error in ubuntu EB-ON test
dmontgomeryNREL 997d674
debug-2
dmontgomeryNREL 058c370
debug-3: MPI?
dmontgomeryNREL 8f4291e
debug-4 wasn't MPI...
dmontgomeryNREL a53b029
debug 5: ctest with one proc.
dmontgomeryNREL c7a863a
debug 6: set PELE_NP 1 in CMakeLists
dmontgomeryNREL c7170e8
debug 7: set PELE_ENABLE_MPI OFF
dmontgomeryNREL a3d989d
debug 8: remove MPI commands from add_test_rt
dmontgomeryNREL 18fd75e
Cleanup after debugging
dmontgomeryNREL 5f1cc4f
Merge branch 'development' into composition-test
dmontgomeryNREL f685611
Try ubuntu-latest with MPI_COMMANDS
dmontgomeryNREL a8d3595
use ubuntu 22.04
dmontgomeryNREL d0cf66a
Merge branch 'development' into composition-test
dmontgomeryNREL 76a330a
Merge branch 'development' into composition-test
dmontgomeryNREL d86f5ae
Remove amrex::unused
dmontgomeryNREL 672cf65
Merge branch 'development' into composition-test
dmontgomeryNREL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
## EB\_ODEQty | ||
A 2D inflow/outflow setup with an optional EB cylinder in the middle of the flow. Demonstrates how to use ProblemSpecificFunctions and the ODE quantities. The ODE quantities experience simple exponential decay that gets stiffer for each quantity. Specifically, $\frac{\partial B_k}{\partial t} = \gamma \cdot 10^{k+1} B_k$, for $k = 0, 1,\dots,$ NUM_ODE and $\gamma < 0$. | ||
This RegTest contains two test cases that demonstrate the use of user defined external source terms: | ||
1. `prob_parm.ode_qty_test = true`: A 2D inflow/outflow case with an optional EB cylinder in the middle of the flow. This demonstrates how to use `ProblemSpecificFunctions` and the ODE quantities. The ODE quantities experience simple exponential decay that gets stiffer for each quantity. Specifically, $\frac{\partial B_k}{\partial t} = \gamma \cdot 10^{k+1} B_k$, for $k = 0, 1,\dots,$ NUM_ODE and $\gamma < 0$. | ||
2. `prob_parm.composition_test = true`: This case tests the implementation of the user defined external sources for density, $\rho$, and the species $Y_m$. The flow is set to zero with initial mass fractions $Y_{CO_2} = 0.15$, $Y_{N_2} = 0.25$ and $Y_{AR} = 0.6$. After $t_s$ seconds, CO2 is added via an external source at a rate of $S_{ext,\rho Y_{CO_2}}$ kg/m$^3$/s. Since CO2 is being added to the domain, density will increase at a rate of $S_{ext,\rho} = S_{ext,\rho Y_{CO_2}}$. Results are compared to analytical solutions in `plot-comps.py` and tested in the CI via `test.py`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#----------------------DOMAIN DEFINITION------------------------- | ||
geometry.is_periodic = 1 1 # For each dir, 0: non-perio, 1: periodic | ||
geometry.coord_sys = 0 # 0 => cart, 1 => RZ | ||
geometry.prob_lo = 0 0 | ||
geometry.prob_hi = 0.01 0.01 | ||
|
||
#--------------------------BC FLAGS------------------------------ | ||
# Interior, Inflow, Outflow, Symmetry, | ||
# SlipWallAdiab, NoSlipWallAdiab, SlipWallIsotherm, NoSlipWallIsotherm | ||
peleLM.lo_bc = Interior Interior | ||
peleLM.hi_bc = Interior Interior | ||
|
||
#-------------------------AMR CONTROL---------------------------- | ||
amr.n_cell = 1 1 # Level 0 number of cells in each direction | ||
amr.v = 0 # AMR verbose | ||
amr.max_level = 0 # maximum level number allowed | ||
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est | ||
amr.grid_eff = 0.7 # what constitutes an efficient grid | ||
amr.blocking_factor = 1 # block factor in grid generation (min box size) | ||
amr.max_grid_size = 64 # max box size | ||
|
||
#--------------------------- Problem ---------------------------- | ||
prob.T_mean = 300.0 | ||
prob.P_mean = 101325.0 | ||
prob.meanFlowMag = 0.0 | ||
prob.meanFlowDir = 1 | ||
prob.composition_test = true | ||
prob.Y_CO2_0 = 0.15 # Initial CO2 mass frac contribution | ||
prob.Y_N2_0 = 0.25 # Initial N2 mass frac contribution | ||
prob.Y_AR_0 = 0.6 # Initial AR mass frac contribution | ||
prob.extRhoYCO2 = 145.0 # Source strength for rhoYCO2 | ||
prob.extRhoYCO2_ts = 0.003 # time when source starts | ||
|
||
#---------------------- Temporal CONTROL ------------------------- | ||
peleLM.do_temporals = 1 | ||
peleLM.temporal_int = 1 | ||
peleLM.do_extremas = 1 | ||
|
||
#---------------------------TIME STEPPING------------------------ | ||
amr.stop_time = 0.01 | ||
amr.fixed_dt = 0.001 | ||
|
||
#-------------------------PELE CONTROLS---------------------- | ||
peleLM.v = 1 | ||
peleLM.deltaT_verbose = 1 | ||
peleLM.print_chi_convergence = 1 | ||
peleLM.sdc_iterMax = 2 | ||
peleLM.user_defined_ext_sources = true | ||
|
||
#---------------------------IO CONTROL--------------------------- | ||
amr.check_file = "chk" | ||
amr.check_per = -1 | ||
amr.plot_file = "plt" | ||
amr.plot_per = 0.1 | ||
amr.derive_plot_vars = mass_fractions | ||
|
||
#------------------------- EB SETUP ----------------------------- | ||
eb2.geom_type = "all_regular" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baperry2 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ignore unused and the one below shouldn't be needed. ignore-Unused should only be needed when certain variables are excluded by compile time macros, not runtime conditionals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying. I made the update and merged the most recent branch.