-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add particles #99
Add particles #99
Conversation
src/incflo_advance.cpp
Outdated
@@ -82,5 +82,9 @@ void incflo::Advance() | |||
{ | |||
amrex::Print() << "Time per step " << end_step << std::endl; | |||
} | |||
|
|||
#ifdef INCFLO_USE_PARTICLES |
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.
Wouldn't we want to include this redistribution in the calculation of the time per step?
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.
Done
src/particles/incflo_PC.H
Outdated
if (a_var_name == "mass_density") { | ||
massDensity( a_mf, a_lev ); | ||
} else { | ||
a_mf.setVal(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.
Is there a reason why a_mf is set to zero for variable unknown to computeMeshVar? I might argue it would be better/clearer to Abort here.
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.
Done
src/particles/incflo_PCInit.cpp
Outdated
Real x_ctr = cyl_center[0]; | ||
Real y_ctr = cyl_center[1]; | ||
|
||
// Remove particles that are outside of the cylindner |
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.
// Remove particles that are outside of the cylindner | |
// Remove particles that are outside of the cylinder |
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.
Done
src/particles/incflo_Tracers.cpp
Outdated
using namespace amrex; | ||
|
||
/*! Read tracer particles parameters */ | ||
void incflo::readTracersParams () |
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.
void incflo::readTracersParams () | |
void incflo::readTracerParticlesParams () |
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.
Done
src/setup/init.cpp
Outdated
@@ -191,6 +194,10 @@ void incflo::ReadParameters () | |||
} | |||
} // end prefix eb_flow | |||
#endif | |||
|
|||
#ifdef INCFLO_USE_PARTICLES | |||
readTracersParams(); |
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.
readTracersParams(); | |
readTracerParticlesParams(); |
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.
Done
src/incflo.H
Outdated
bool m_use_tracer_particles; /*!< tracer particles that advect with flow */ | ||
|
||
/*! Read tracer particles parameters */ | ||
void readTracersParams (); |
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.
void readTracersParams (); | |
void readTracerParticlesParams (); |
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.
Done
src/utilities/io.cpp
Outdated
@@ -435,7 +447,7 @@ void incflo::WritePlotFile() | |||
pltscaVarsName.push_back("gpx"); | |||
++icomp; | |||
} | |||
if (m_plt_gpy) { | |||
if (m_plt_gpy) { |
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.
if (m_plt_gpy) { | |
if (m_plt_gpy) { |
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.
The spacing on this is funny. Not completely sure that the suggestion (adding 4 spaces) fixes it.
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.
Done
src/utilities/io.cpp
Outdated
@@ -372,8 +380,7 @@ void incflo::WritePlotFile() | |||
if(m_plt_error_w) ncomp += 1; | |||
#endif | |||
|
|||
// Error in nodal pressure (computed vs exact) | |||
if(m_plt_error_p) ncomp += 1; | |||
// Error in nodal pressure (computed vs exact) if(m_plt_error_p) ncomp += 1; |
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.
Did you mean to comment out the option m_plt_error_p? If so, maybe an Abort should be added if the inputs file tries to set this?
src/particles/incflo_PCEvolve.cpp
Outdated
Real y_ctr = cyl_center[1]; | ||
Real z_ctr = cyl_center[2]; | ||
|
||
// Remove particles that are outside of the cylindner |
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.
It seems like maybe this part where particles outside a cylinder are removed is specific to a particular problem? Maybe a switch would be appropriate here? But then you'd probably want to also supply additional bcs for the particles (since now it seems only top and bottom reflect bcs exist)? ... Just trying to think about gotchas if another user wants particles, but perhaps a comment or warning is good enough for now.
No description provided.