Include another XML in XML file?
Hello!
Suppose I am setting up a lot of different simulations where I want to ensure that they always run using the same constants, for example:
<constantsdef> <lattice bound="1" fluid="1" /> <gravity x="0.0" y="0.0" z="-9.8065" comment="Gravitational acceleration" units_comment="m/s^2" /> <rhop0 value="1000.0" comment="Reference density of the fluid" units_comment="kg/m^3" /> <hswl value="0.0" auto="true" comment="Maximum still water level to calculate speedofsound using coefsound" units_comment="metres (m)" /> <gamma value="7.0" comment="Polytropic constant for water used in the state equation" /> <speedsystem value="0.0" auto="true" comment="Maximum system speed (by default the dam-break propagation is used)" /> <coefsound value="20.0" comment="Coefficient to multiply speedsystem" /> <speedsound value="0.0" auto="true" comment="Speed of sound to use in the simulation (by default speedofsound=coefsound*speedsystem)" /> <coefh value="1.2" comment="Coefficient to calculate the smoothing length (h=coefh*sqrt(3*dp^2) in 3D)" /> <cflnumber value="0.2" comment="Coefficient to multiply dt" /> <h value="0.0" auto="true" units_comment="metres (m)" /> <b value="0.0" auto="true" units_comment="Pascal (Pa)" /> <massbound value="0" auto="true" units_comment="kg" /> <massfluid value="0" auto="true" units_comment="kg" /> </constantsdef>
Would I then be able to save this as a "MyConstants.xml" and include it in the other files, so that I only need to change it from one place?
Kind regards
Comments
@Alex do you know if the developer team thinks this is a worthwhile feature or perhaps they have a different workflow?
Kind regards
I do not think that this is a priority now... Sorry
But we will discuss that when preparing new release in the future
No problem at all! There is always a lot of stuff to work on, so I was just curious 😊
I agree that it would properly not be much more than a minor quality of life improvement - and looking forward to the release in 2022!
Kind regards