Hi everyone,
I've implemented length scaling in MAMBA-BDM, which scales all material
properties to help things solve easier. Basically I have things that are
10^-18 and 10^10 in SI units, and scaling helps equalize them so small
residuals aren't lost in the noise.
However, I still have a change a few input file parameters to fit. When I
change the "scaling_factor," I have to manually change things like
DirichletBC values, GeneratedMesh sizes, and initial conditions for
kernels that aren't handled (scaled) inside my material file, kernels,
etc.
So, is there a way to symbolically define input parameters in the input
file? An example would be:
_________________________________
[ type = GeneratedMesh
xmax = 1e-5 * scaling_factor
ymax = 5e-5 * scaling_factor
.....
[SomeDirichletBC](Mesh]
Alternatively, would I have to define my own Mesh objects, ICs, etc. to
read in my scaling_factor? This seems like a more roundabout way to do
it, so I'm hoping for option 1.
Thanks,
-Mike Short
To use aprepro, you would put algebraic expressions that you want to be evaluated in curly braces in your input file, and then run aprepro on the file to generate another file that is used as input for MOOSE. Your example would look like this:
) value = 600 / scaling_factor ..... [ scaling_factor = 0.001
To use aprepro, you would put algebraic expressions that you want to be evaluated in curly braces in your input file, and then run aprepro on the file to generate another file that is used as input for MOOSE. Your example would look like this:
{scaling_factor = 0.001}
Mesh type = GeneratedMesh xmax = {1e-5 * scaling_factor} ymax = {5e-5 * scaling_factor} ..... [= {600 / scaling_factor} ..... SomeMaterial
You'd then run algebra orig_file.i new_file.i and then use new_file.i as the input for MOOSE.