Clunky input for parameter studies. #1443
Replies: 2 comments 6 replies
-
@rrsettgast - The strategy that I prefer for this is to use Parameters and the Include strategy that are implemented in the python xml preprocessor (these can be built and placed into the bin directory using <Problem>
<Parameters>
<Parameter
name="mesh_root"
value="/usr/workspace/uwisc/WHOLESCALE/mesh_development/large_scale_all_faults"/>
<Parameter name="table_root"
value="/usr/workspace/uwisc/WHOLESCALE/geologic_model/derived_from_poisson_ratio"/>
<Parameter name="pressure_init_time" value="5 [day]"/>
<Parameter name="pump_start" value="200 [day]"/>
<Parameter name="pump_shutdown" value="1000 [day]"/>
<Parameter name="shutdown_time" value="20 [hour]"/>
<Parameter name="post_shutdown" value="3 [day]"/>
<Parameter name="init_dt" value="1 [day]"/>
<Parameter name="max_dt" value="20 [day]"/>
<Parameter name="shutdown_dt" value="1 [hour]"/>
</Parameters>
<Included>'
<File name="/usr/WS1/uwisc/WHOLESCALE/numerical_models/geosx/large_scale_poroelastic_all_faults/poroelastic_problem.xml"/>
<File name="/usr/WS1/uwisc/WHOLESCALE/numerical_models/geosx/large_scale_poroelastic_all_faults/2016_wells.xml"/>
<File name="/usr/WS1/uwisc/WHOLESCALE/numerical_models/geosx/large_scale_poroelastic_all_faults/well_nodesets.xml"/>
<File name="/usr/WS1/uwisc/WHOLESCALE/numerical_models/geosx/large_scale_poroelastic_all_faults/microseismic.xml"/>
</Included>
</Problem> The parameters (which can be strings, floats, etc.) are used throughout the included xml files. The string parameters here define a root path for the different meshes and tables. A major benefit for this approach is that it isolates things that you may want to modify, and would allow a non-super user to run a sensitivity analysis. They can also help to clean up sections of an xml file where strings are re-used a lot, for example: <Functions>
<TableFunction
name="bulk_modulus"
inputVarNames="{ elementCenter }"
coordinateFiles="{ $table_root$/x.csv, $table_root$/y.csv, $table_root$/z.csv }"
voxelFile="$table_root$/bulkModulus$table_modifier$.csv"/>
</Functions> In this example, I am also testing some configurations with different wells/pumping. These can be swapped in/out by including different files. |
Beta Was this translation helpful? Give feedback.
-
@cssherman Do you have the time to implement this? |
Beta Was this translation helpful? Give feedback.
-
I have noticed that running scaling studies (or parameter studies) by splitting up xml files is still quite clunky. For instance if we wanted to run 4 meshes, we could take the mesh block and place each of them in a file (
mesh0.xml, mesh1.xml...
), then we include themeshX.xml
in another file (problem.xml
) with the rest of the specifications....however the include statement explicitly contains the name of themeshX.xml
so then you need 4 variants ofproblem.xml
.Of course, you could play some games with subdirectories and symbolic links (i.e. always include
mesh.xml
inrun0/problem.xml
, but haverun0/mesh.xml
-->mesh0.xml
) but this could get a little clunky as well.Another solution would be to create a third file (
run0.xml
) that includes some combination ofmeshX.xml
andproblem.xml
where the latter does't include the former. This does explicitly keep a record of the files used for a run....which is nice.One other solution would be to allow two xml files be read from the command line, with the xml nodes combined when read. this might be the most flexible.
@cssherman @francoishamon @mquanbui thoughts?
Beta Was this translation helpful? Give feedback.
All reactions