Skip to content
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

Merged
merged 42 commits into from
May 13, 2022
Merged

Landon/soot and spray #72

merged 42 commits into from
May 13, 2022

Conversation

ldowen
Copy link
Collaborator

@ldowen ldowen commented Apr 11, 2022

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.

@ldowen ldowen requested a review from esclapez April 11, 2022 20:40

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.);
Copy link
Collaborator

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.);
Copy link
Collaborator

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]);
Copy link
Collaborator

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.

Copy link
Collaborator

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 ?

int firstpass = FIRSTSOOT;
int numpass = NUMSOOTVAR;
#else
int firstpass = 0;
Copy link
Collaborator

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) {
Copy link
Collaborator

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()) {
Copy link
Collaborator

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 ?

@@ -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
Copy link
Collaborator

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) ?

@ldowen ldowen marked this pull request as draft April 20, 2022 19:29
@ldowen ldowen marked this pull request as ready for review May 3, 2022 22:41
@esclapez esclapez merged commit 68e5d26 into development May 13, 2022
@esclapez esclapez deleted the Landon/soot_and_spray branch May 13, 2022 21:07
@esclapez esclapez restored the Landon/soot_and_spray branch May 13, 2022 22:14
@esclapez esclapez deleted the Landon/soot_and_spray branch May 16, 2022 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

None yet

2 participants