-
Notifications
You must be signed in to change notification settings - Fork 40
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
Landon/soot and spray #72
Conversation
…erive variables not working at the moment
|
||
for (int lev = 0; lev <= finest_level; lev++) { | ||
m_extSource[lev]->define(grids[lev], dmap[lev], NVAR, amrex::max(m_nGrowAdv, m_nGrowMAC), MFInfo(), *m_factory[lev]); | ||
m_extSource[lev]->setVal(0.); |
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.
Do you need to setVal ?
@@ -152,6 +173,22 @@ void PeleLM::Advance(int is_initIter) { | |||
averageDownnE(AmrNewTime); | |||
#endif | |||
fillPatchState(AmrNewTime); | |||
// Reset external sources to zero | |||
for (int lev = 0; lev <= finest_level; ++lev) { | |||
m_extSource[lev]->setVal(0.); |
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.
Same question here (is the setVal needed ?)
@@ -54,6 +60,11 @@ void PeleLM::Advance(int is_initIter) { | |||
std::unique_ptr<AdvanceAdvData> advData; | |||
advData.reset(new AdvanceAdvData(finest_level, grids, dmap, m_factory, m_incompressible, | |||
m_nGrowAdv, m_nGrowMAC)); | |||
|
|||
for (int lev = 0; lev <= finest_level; lev++) { | |||
m_extSource[lev]->define(grids[lev], dmap[lev], NVAR, amrex::max(m_nGrowAdv, m_nGrowMAC), MFInfo(), *m_factory[lev]); |
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.
Could m_extSource be smaller than NVAR ? Just trying to minimize how memory we use.
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.
And it seems to be defined regardless of whether we use SOOT/SPRAY or none. Is it voluntary ?
Source/PeleLMAdvection.cpp
Outdated
int firstpass = FIRSTSOOT; | ||
int numpass = NUMSOOTVAR; | ||
#else | ||
int firstpass = 0; |
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.
Not sure we need to define firstpass and numpass if we return right away.
@@ -80,8 +87,34 @@ PeleLM::writePlotNow() | |||
|
|||
if ( m_plot_int > 0 && (m_nstep % m_plot_int == 0) ) { | |||
write_now = true; | |||
} else if (m_plot_per > 0.0) { |
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 doing that !
I was initially planning on pulling it out of incflo with the option of either doing it approximately at the m_plot_per or enforcing exactly the period by shortening the dt. We can probably update that later though ...
@@ -557,6 +605,75 @@ void PeleLM::variablesSetup() { | |||
} else { | |||
typical_values.resize(NVAR,-1.0); | |||
} | |||
if (max_level > 0 && !m_initial_grid_file.empty()) { |
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.
Could you wrap this piece of code in a function ?
Utils/Make.PeleLMeX
Outdated
@@ -25,6 +25,23 @@ ifeq ($(USE_EFIELD),TRUE) | |||
DEFINES += -DPELE_USE_EFIELD | |||
LMdirs += Source/Efield Source/Efield/GMRES Source/Efield/LinOps | |||
endif | |||
ifeq ($(USE_PARTICLES), TRUE) | |||
ifdef SPRAY_FUEL_NUM | |||
DEFINES += -DSPRAY_PELE_LM |
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.
I'm guessing we can't easily change those to be more uniform with other defines (SPRAY_PELE_LM -> PELE_USE_SPRAY) ?
Adds functionality for soot and spray modeling when coupled with PeleMP, which is added as a submodule. Also adds time period based plot files, starting and regridding from grid files, and inputs for prevent plotting of reactions. Still need to figure out how to get derived soot variables to work.