Change of input file / problem parameters during runtime #538
terencelehmann
started this conversation in
Ideas
Replies: 2 comments
-
@terencelehmann this is a neat feature. I am currently looking into whether AMReX has some machinery that can make it easier. Hang tight ;) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I love this idea and always appreciated this capability in OpenFOAM. I found it especially helpful for updating simulation end times, dt, etc, but these are all AMReX-related parameters. Curious to see what @marchdf digs up. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In a recent project, I implemented the option to change the values of selected problem parameters in LMeX dynamically (i.e., during a simulation run). I’d like to know if there’s a relevant use case for this feature (or something similar) in the main LMeX version. The current setup is not ideal, but I’m open to improving it.
Overview of workflow
updateProbParm
function inpelelmex_prob.cpp
, specifying which variables should be re-read.DynamicProbParms.inp
.DynamicProbParms.inp
and trigger re-reading withtouch update_prob_parm
. This calls thecheckMessage
function (similar toplt_and_continue
). When called,updateProbParm
appends the content ofDynamicProbParms.inp
to the parameters and re-reads the specified values.Why this could be useful
Unlike a time-dependent parameter change (e.g., in the
bc_normal
function), this approach does not require all changes to be known at the start of the simulation. For instance, in a flashback study, you can incrementally adjust the inflow velocity toward a limit, or drive the changes via an external controller. This workflow can be simpler than stopping and restarting the simulation with a modified input file.What is not optimal with the current implementation
DynamicProbParms.inp
is always appended to the existing parameters by callingpp.addfile("DynamicProbParms.inp")
. A better approach might exist to avoid repeatedly stacking entries inParmParse
.PeleLMeX_ProblemSpecificFunctions.H
.I’d be happy to hear your opinions and suggestions on how to refine this feature before merging it into LMeX. If you think there’s a similar feature already, or that this isn’t needed, that’s also fine.
Beta Was this translation helpful? Give feedback.
All reactions