Inputs


BC

This is the mechanism for impositing boundary conditions on Set::Field objects of scalar type. Typical convention is for [prefix] to be given by the field name. For instance,

bc.temp.type.xhi = dirichlet dirichlet dirichlet
bc.temp.val.xhi  = 0.0 1.0 0.0

corresponds to the boundary condition for temperature. See the specific integrator for details.

BC::Constant

This is the most commonly used standard boundary condition implementation. The name “Constant” refers to the invariance of the BC value or character along each face of the simulation domain; however, you may cause a change in the value with time by using a Numeric::Interpolator::Linear string.

The BC on each face is specified with a type string that specifies the nature of the BC, and a val that specifies the value. By default, all types are Dirichlet and all values are 0.0. The complete list of BC types are below:

BC Type

Description

Dirichlet

Standard Dirichlet boundary condition (https://en.wikipedia.org/wiki/Dirichlet_boundary_condition). Fixes the value of the function at the boundary.

dirichlet

EXT_DIR

Neumann

Standard Neumann boundary condition (https://en.wikipedia.org/wiki/Neumann_boundary_condition)

neumann

Periodic

Standard periodic boundary condition. (https://en.wikipedia.org/wiki/Periodic_boundary_conditions). Important: Ensure that your geometry is specified to be periodic using geometry.is_periodic. For instance, if periodic in x, set to 1 0 0

periodic

INT_DIR

REFLECT_ODD

Effectively the same as dirichlet but with value fixed to 0

reflect_odd

REFLECT_EVEN

Effectively the same as neumann but with value fixed to 0

BOGUS_BC

Used for internal operations - not for general use

FOEXTRAP

These are BC types inherited from AMReX and not yet implemented in Alamo. If you need BCs of this type, you will need to implement them yourself.

HOEXTRAP

Interior

Inflow

Outflow

Symmetry

SlipWall

NoSlipWall

interior

Marshak

SanchezPomraning

inflow

The BC values can be specified either as a number (e.g. 1.0) or using a linear interpolator string (e.g. (0,1:2.3,-0.1)).

The number of values and types must be either 0 (for defaults), 1 (to set the same for all field components) or N (where N=number of field components).

Parameter

Type

Description

[prefix].type.xlo

queryarr

BC type on the lower x edge (2d) face (3d)

[prefix].type.xhi

queryarr

BC type on the upper x edge (2d) face (3d)

[prefix].type.ylo

queryarr

BC type on the lower y edge (2d) face (3d)

[prefix].type.yhi

queryarr

BC type on the upper y edge (2d) face (3d)

[prefix].type.zlo

queryarr

BC type on the lower z face (processed but ignored in 2d to prevent unused input errors)

[prefix].type.zhi

queryarr

BC type on the upper z face (processed but ignored in 2d to prevent unused input errors)

[prefix].val.xlo

queryarr

BC value on the lower x edge (2d) face (3d)

[prefix].val.xhi

queryarr

BC value on the upper x edge (2d) face (3d)

[prefix].val.ylo

queryarr

BC value on the lower y edge (2d) face (3d)

[prefix].val.yhi

queryarr

BC value on the upper y edge (2d) face (3d)

[prefix].val.zlo

queryarr

BC value on the lower z face (processed but ignored in 2d to prevent unused input errors)

[prefix].val.zhi

queryarr

BC value on the upper z face (processed but ignored in 2d to prevent unused input errors)

BC::Step

Warning

This will be replaced by the more general BC::Expression

Parameter

Type

Description

[prefix].h1

query

Location of the step on the xlo edge/face

[prefix].h2

query

Location of the step on the xhi edge/face

BC::Operator

The BC::Operator family of BC classes are designed to work with implicit operators. They are not the same thing as other BC types and cannot be used in that same way. (This is not an ideal taxonomy for BC structures - we may transition other BC types to be subspaces of BC::Integrator.)

BC::Operator::Elastic

Class of BC operators that work with Operator::Elastic.

BC::Operator::Elastic::Constant

This BC defines boundary conditions that are constant with respect to space. However they may change in time using the Numeric::Interpolator::Linear method.

In 2D, BCs are prescribed for each edge (4) and corner (4) on the boundary, for a total of 8 possible regions. In 3D, BCs are prescribed for each face (6), each edge (12), and each corner (8), for a total of 26 possible regions. Care must be taken to define BCs for edges/corners consistently with the faces/edges, or you will get poor convergence and inaccurate behavior. (See BC::Operator::Elastic::TensionTest for a reduced BC with streamlined load options.)

To define a boundary condition, you must define both a “type” and a “value” in each direction. The type can be “displacement”, “disp”, “neumann”, “traction”, “trac”. The value is the corresponding value. All BCs are, by default, dirichlet (displacement) with a value of zero.

Parameter

Type

Description

[prefix].type.xloylozlo

queryarr

3D Corner

[prefix].type.xloylozhi

queryarr

3D Corner

[prefix].type.xloyhizlo

queryarr

3D Corner

[prefix].type.xloyhizhi

queryarr

3D Corner

[prefix].type.xhiylozlo

queryarr

3D Corner

[prefix].type.xhiylozhi

queryarr

3D Corner

[prefix].type.xhiyhizlo

queryarr

3D Corner

[prefix].type.xhiyhizhi

queryarr

3D Corner

[prefix].type.ylozlo

queryarr

3D Edge

[prefix].type.ylozhi

queryarr

3D Edge

[prefix].type.yhizlo

queryarr

3D Edge

[prefix].type.yhizhi

queryarr

3D Edge

[prefix].type.zloxlo

queryarr

3D Edge

[prefix].type.zloxhi

queryarr

3D Edge

[prefix].type.zhixlo

queryarr

3D Edge

[prefix].type.zhixhi

queryarr

3D Edge

[prefix].type.xloylo

queryarr

3D Edge / 2D Corner

[prefix].type.xloyhi

queryarr

3D Edge / 2D Corner

[prefix].type.xhiylo

queryarr

3D Edge / 2D Corner

[prefix].type.xhiyhi

queryarr

3D Edge / 2D Corner

[prefix].type.xlo

queryarr

3D Face 2D Edge

[prefix].type.xhi

queryarr

3D Face 2D Edge

[prefix].type.ylo

queryarr

3D Face 2D Edge

[prefix].type.yhi

queryarr

3D Face 2D Edge

[prefix].type.zlo

queryarr

3D Face

[prefix].type.zhi

queryarr

3D Face

[prefix].val.xloylozlo

queryarr

3D Corner

[prefix].val.xloylozhi

queryarr

3D Corner

[prefix].val.xloyhizlo

queryarr

3D Corner

[prefix].val.xloyhizhi

queryarr

3D Corner

[prefix].val.xhiylozlo

queryarr

3D Corner

[prefix].val.xhiylozhi

queryarr

3D Corner

[prefix].val.xhiyhizlo

queryarr

3D Corner

[prefix].val.xhiyhizhi

queryarr

3D Corner

[prefix].val.ylozlo

queryarr

3D Edge

[prefix].val.ylozhi

queryarr

3D Edge

[prefix].val.yhizlo

queryarr

3D Edge

[prefix].val.yhizhi

queryarr

3D Edge

[prefix].val.zloxlo

queryarr

3D Edge

[prefix].val.zloxhi

queryarr

3D Edge

[prefix].val.zhixlo

queryarr

3D Edge

[prefix].val.zhixhi

queryarr

3D Edge

[prefix].val.xloylo

queryarr

3D Edge / 2D Corner

[prefix].val.xloyhi

queryarr

3D Edge / 2D Corner

[prefix].val.xhiylo

queryarr

3D Edge / 2D Corner

[prefix].val.xhiyhi

queryarr

3D Edge / 2D Corner

[prefix].val.xlo

queryarr

3D Face / 2D Edge

[prefix].val.xhi

queryarr

3D Face / 2D Edge

[prefix].val.ylo

queryarr

3D Face / 2D Edge

[prefix].val.yhi

queryarr

3D Face / 2D Edge

[prefix].val.zlo

queryarr

3D Face

[prefix].val.zhi

queryarr

3D Face

BC::Operator::Elastic::Expression

Parameter

Type

Description

This is basically the same as BC::Operator::Elastic::Constant except that you can use dynamically compiled expressions in space and time to define values.

Usage is exactly the same except that the “val” inputs can depend on x, y, z, and t.

[prefix].type.xloylozlo

queryarr

3D Corner

[prefix].type.xloylozhi

queryarr

3D Corner

[prefix].type.xloyhizlo

queryarr

3D Corner

[prefix].type.xloyhizhi

queryarr

3D Corner

[prefix].type.xhiylozlo

queryarr

3D Corner

[prefix].type.xhiylozhi

queryarr

3D Corner

[prefix].type.xhiyhizlo

queryarr

3D Corner

[prefix].type.xhiyhizhi

queryarr

3D Corner

[prefix].type.ylozlo

queryarr

3D Edge

[prefix].type.ylozhi

queryarr

3D Edge

[prefix].type.yhizlo

queryarr

3D Edge

[prefix].type.yhizhi

queryarr

3D Edge

[prefix].type.zloxlo

queryarr

3D Edge

[prefix].type.zloxhi

queryarr

3D Edge

[prefix].type.zhixlo

queryarr

3D Edge

[prefix].type.zhixhi

queryarr

3D Edge

[prefix].type.xloylo

queryarr

3D Edge / 2D Corner

[prefix].type.xloyhi

queryarr

3D Edge / 2D Corner

[prefix].type.xhiylo

queryarr

3D Edge / 2D Corner

[prefix].type.xhiyhi

queryarr

3D Edge / 2D Corner

[prefix].type.xlo

queryarr

3D Face 2D Edge

[prefix].type.xhi

queryarr

3D Face 2D Edge

[prefix].type.ylo

queryarr

3D Face 2D Edge

[prefix].type.yhi

queryarr

3D Face 2D Edge

[prefix].type.zlo

queryarr

3D Face

[prefix].type.zhi

queryarr

3D Face

BC::Operator::Elastic::TensionTest

Parameter

Type

Description

[prefix].type

query

Tension test type. (Only option right now is uniaxial_stress_clamp)

[prefix].disp

query

Applied displacement (can be interpolator)

[prefix].trac

query

Applied traction (can be interpolator)


IC

IC::Affine

Initialize a field to a value (alpha) on the positive side of a hyperplane

Warning

This is an old-fasioned IC that will soon be deleted.

Parameter

Type

Description

ic.n

queryarr

Normal vector for hyperplane

ic.alpha

query

Value of the field on the positive side of the hyperplane

IC::BMP

Initialize a field using a bitmap image. (2D only)

Note that in GIMP, you must select “do not write color space information” and “24 bit R8 G8 B8” when exporting the BMP file.

Parameter

Type

Description

[prefix].filename

query

BMP filename.

[prefix].fit

query

How to fit. (options: stretch, fitheight, fitwidth)

[prefix].channel

query

Color channel to use (options: r, R, g, G, b, B)

[prefix].min

query

Scaling value - minimum (default: 0.0)

[prefix].max

query

Scaling value - maximum (default: 255.0)

IC::Constant

Basic IC that just sets the entire field to a constant value. Works with a single or multiple-component field.

Parameter

Type

Description

[prefix].value

queryarr

Array of constant values. The number of values should equal either 1 or N where N is the number of fab components

IC::Cuboid

Parameter

Type

Description

ic.center

queryarr

Coordinates (X Y Z) of the center of the square/cube.

ic.length

queryarr

Lenth of the square/cube edges

IC::DoubleNotch

Implement a double-notch. Primarily used in fracture.

Warning

This function is depricated. Use IC::Expression instead.

Parameter

Type

Description

[prefix].thickness

query

Thickness of the notches

[prefix].width

query

Width of the notches

[prefix].x0

queryarr

Center of the notches

[prefix].L

query

Length of the notches

IC::Ellipse

If number_of_inclusions is specified, then multiple ellipses are specified. In this case, each parameter must have number_of_inclusion*M values, where M is the number of values specified for the single ellipse case.

Warning

This class is redundant with IC::Ellipsoid and IC::Expression and will probably be consolidated.

Parameter

Type

Description

[prefix].x0

queryarr

Coorinates of ellipse center

[prefix].eps

query

Diffuse boundary thickness

[prefix].A

queryarr

DxD square matrix defining an ellipse.

[prefix].a

queryarr

If A is not defined, then assume a sphere with radius a

[prefix].number_of_inclusions

query

Number of ellipses

[prefix].center

queryarr

center of the ellipse

[prefix].A

queryarr

either a vector containing ellipse radii, or a matrix defining the ellipse

[prefix].A

queryarr

Same

[prefix].radius

queryarr

Array of radii [depricated]

[prefix].eps

queryarr

Regularization for smooth boundary

[prefix].invert

query

Flip the inside and the outside

IC::Ellipsoid

This IC initializes a single-component fab using the formula

\[\begin{split}\phi = \begin{cases} \alpha_{in} & (\mathbf{x}-\mathbf{x}_0)^T\mathbf{A}(\mathbf{x}-\mathbf{x}_0) \le r \\ \alpha_{out} & \text{else} \end{cases}\end{split}\]

The boundary can be mollified using an error function with parameter \(\varepsilon\)

Warning

This IC is redundant with IC::Ellipse and IC::Expression and will probably be consolidated

Parameter

Type

Description

[prefix].center

queryarr

Center of the ellipse \(\mathbf{x}_0\)

[prefix].A

queryarr

Matrix defining elipse radii and orientation

[prefix].radius

queryarr

“Vector of radii (use instead of A)”

[prefix].eps

queryarr

Mollifying value for erf

[prefix].in_value

query

Value of field inside ellipse (default: 0)

[prefix].out_value

query

Value of field outside ellipse (default: 1)

[prefix].mollifier

query

Type of mollifier to use (options: dirac, [gaussian])

IC::Expression

Initialize a field using a mathematical expression. Expressions are imported as strings and are compiled real-time using the AMReX Parser.

Works for single or multiple-component fields. Use the regionN (N=0,1,2, etc. up to number of components) to pass expression. For example:

ic.region0 = "sin(x*y*z)"
ic.region1 = "3.0*(x > 0.5 and y > 0.5)"

for a two-component field. It is up to you to make sure your expressions are parsed correctly; otherwise you will get undefined behavior.

Constants You can add constants to your expressions using the constant directive. For instance, in the following code

psi.ic.type=expression
psi.ic.expression.constant.eps = 0.05
psi.ic.expression.constant.R   = 0.25
psi.ic.expression.region0 = "0.5 + 0.5*tanh((x^2 + y^2 - R)/eps)"

the constants eps and R are defined by the user and then used in the subsequent expression. The variables can have any name made up of characters that is not reserved. However, if multiple ICs are used, they must be defined each time for each IC.

Parameter

Type

Description

[prefix].coord

query

coordinate system to use: “cartesian” (for x,y,z,t) and “polar” (for r, theta, z, t)

IC::Laminate

Create a single laminate with specified orientation, thickness, and offset.

Parameter

Type

Description

[prefix].number_of_inclusions

query

How many laminates (MUST be greater than or equal to 1). Default = 1

[prefix].center

queryarr

(x,y,[z]) values for the center point of the laminate

[prefix].thickness

queryarr

thickness of the laminate

[prefix].orientation

queryarr

Vector normal to the interface of the laminate

[prefix].eps

queryarr

Diffuse thickness

[prefix].mollifier

query

Type of mollifer to use (options: dirac, [gaussian])

[prefix].singlefab

query

Switch to mode where only one component is used.

[prefix].invert

query

Take the complement of the laminate

IC::Notch

Create a simple notch in an otherwise uniformly filled region. (This was created for, and mostly used for, Mode II fracture tests.)

Parameter

Type

Description

[prefix].center

queryarr

Center of notch

[prefix].orientation

queryarr

Vector describing notch orientation

[prefix].thickness

queryarr

Thickness of notch

[prefix].length

queryarr

Length of notch

[prefix].radius

queryarr

Radius of notch ends

[prefix].eps

query

Magnitude of mollifier

[prefix].mollifier

query

IC::PerturbedInterface

Initialize a perturbed interface using Fourier Modes

Notes: 1. todo Extend this class to allow for 3D perturbations, currently only 2D are allowed 2. todo Allow for cosine (or complex exponential) expansions rather than just sin. 3. note This is a two grain only initial condition. 4. note This replaces the depricated “perturbed_bar” initial condition from previous versions

The interface is defined as the \(x=0\) plane (2D), or the \(x=0,z=0\) plane (3D). The equation for the interface is given by \(y(x,z) = \sum_{n\in \{n_1,\ldots,n_N\}} A_n \sin(n\pi x/L_x)\) where \(A_n\) are the amplitudes (stored in #wave_amplitudes), \(n_1,\ldots,n_N\subset\mathbb{Z}_+\) are wave numbers (stored in #wave_numbers), and \(L_x\) is the length in the x direction (obtained using the #geom object).

Grain 1 is defined as being above \(y(x,z)\), Grain 2 is defined as being below.

Parameter

Type

Description

[prefix].wave_numbers

queryarr

Wave numbers

[prefix].wave_amplitudes

queryarr

Wave amplitudes

[prefix].normal

query

Which axis is normal to the interface (x,y,z)

[prefix].offset

query

Interface offset from origin

[prefix].reverse

query

If true, flip the interface (default:false)

[prefix].mollifier

query

Mollifier (options: dirac, [gaussian])

[prefix].eps

query

Magnitude of mollifier

IC::PS

Fill a domain with randomly packed and sized spheres.

Warning

This is not used for anything useful as far as we can see. It will likely be removed shortly.

Parameter

Type

Description

[prefix].nspheres

query

[prefix].matrix

query

[prefix].inclusion

query

IC::PSRead

Fill a domain (region where field=0) with packed spheres (regions where field=1). Sphere locations and radii are determined from an xyzr file.

Parameter

Type

Description

[prefix].eps

query

Diffuseness of the sphere boundary

[prefix].filename

query

Location of .xyzr file

IC::Sphere

Parameter

Type

Description

This is a somewhat antiquated IC that will eventually be replaced with the Expression IC.

[prefix].radius

query

Radius of the sphere

[prefix].center

queryarr

Vector location of the sphere center

[prefix].inside

query

Value of the field inside the sphere

[prefix].outside

query

Value of the field outside teh sphere

[prefix].type

query

Type - can be cylinder oriented along the x, y, z directions or full sphere.

IC::Trig

Parameter

Type

Description

[prefix].nr

queryarr

[prefix].ni

queryarr

[prefix].dim

query

[prefix].alpha

query

IC::TabulatedInterface

Parameter

Type

Description

[prefix].xs

queryarr

[prefix].ys

queryarr

IC::Voronoi

Parameter

Type

Description

[prefix].number_of_grains

query

[prefix].alpha

queryarr

[prefix].seed

query


IO

IO::ParmParse

This is a thin wrapper to the amrex::ParmParse class This class exists to add some additional parsing capability, e.g. parsing Set::Matrix and Set::Vector data types.

IO::ParmParse uses static Parse() functions to perform cascading class-based input parsing. See the Autodoc and Autotest section for instructions on adding documentation.

This is standard infrastructure code; make sure you know what you ard doing before you change it.

IO::WriteMetaData

This provide an IO routine for generating run-specific output. Every Alamo run produces a metadata file and (if applicable) a diff.patch file that reflects the exact state when the simulation was run. Note that the file WriteMetaData.cpp file is _always_ recompiled upon make, in order to pull the latest information about the local state at build.

This is standard infrastructure code; make sure you know what you ard doing before you change it.


Integrator

Pure abstract class for managing data structures, time integration (with substepping), mesh refinement, and I/O.

Native input file parameters:

max_step  = [maximum number of timesteps]
stop_time = [maximum simulation time]
timestep  = [time step for coarsest level]

amr.regrid_int = [number of timesteps between regridding]
amr.plot_int   = [number of timesteps between dumping output]
amr.plot_file  = [base name of output directory]

amr.nsubsteps  = [number of temporal substeps at each level. This can be
                  either a single int (which is then applied to every refinement
                  level) or an array of ints (equal to amr.max_level)
                  corresponding to the refinement for each level.]

Inherited input file parameters (from amrex AmrMesh class):

amr.v                  = [verbosity level]
amr.max_level          = [maximum level of refinement]
amr.n_proper           =
amr.grid_eff           =
amr.n_error_buff       =
amr.ref_ratio_vect     = [refinement ratios in each direction]
amr.ref_ratio          = [refinement ratio in all directions (cannot be used with ref_ratio_vect)]
amr.max_grid_x         =
amr.blocking_factor    =
amr.n_cell             = [number of cells on coarsest level]
amr.refine_grid_layout =
amr.check_input        =

Parameter

Type

Description

These are basic parameters that are, in general, common to all Alamo simulations.

max_step

query

Number of iterations before ending

stop_time

query

Simulation time before ending

timestep

query

Nominal timestep on amrlev = 0

restart

query

Name of restart file to READ from

restart_cell

query

Name of cell-fab restart file to read from

restart_node

query

Name of node-fab restart file to read from

ignore

queryarr

Space-separated list of entries to ignore

These are parameters that are specific to the AMR/regridding part of the code.

amr.regrid_int

query

Regridding interval in step numbers

amr.base_regrid_int

query

Regridding interval based on coarse level only

amr.plot_int

query

Interval (in timesteps) between plotfiles

amr.plot_dt

query

Interval (in simulation time) between plotfiles

amr.plot_file

query

Output file

amr.cell.all

query

Turn on to write all output in cell fabs (default: off)

amr.cell.any

query

Turn off to prevent any cell based output (default: on)

amr.node.all

query

Turn on to write all output in node fabs (default: off)

amr.node.any

query

Turn off to prevent any node based output (default: on)

amr.max_plot_level

query

Specify a maximum level of refinement for output files

amr.nsubsteps

queryarr

Number of substeps to take on each level (default: 2)

amr.nsubsteps

query

Number of substeps to take on each level (set all levels to this value)

Information on how to generate thermodynamic data (to show up in thermo.dat)

amr.thermo.int

query

Default: integrate every time. Integration interval (1)

amr.thermo.plot_int

query

Interval (in timesteps) between writing

amr.thermo.plot_dt

query

Interval (in simulation time) between writing

Instead of using AMR, prescribe an explicit, user-defined set of grids to work on. This is pretty much always used for testing purposes only.

explicitmesh.on

query

Use explicit mesh instead of AMR

Integrator::CahnHilliard

CahnHilliard

Integrator::Flame

Parameter

Type

Description

pf.eps

query

Burn width thickness

pf.kappa

query

Interface energy param

pf.gamma

query

Scaling factor for mobility

pf.lambda

query

Chemical potential multiplier

pf.w1

query

Unburned rest energy

pf.w12

query

Barrier energy

pf.w0

query

Burned rest energy

pf.P

query

Pressure [UNITS?]

pf.r_ap

query

AP Power law multiplier

pf.n_ap

query

AP Power law exponent

pf.r_htpb

query

HTPB Power law multiplier

pf.n_htpb

query

HTPB Power law exponent

pf.r_comb

query

Combination power law multiplier

pf.n_comb

query

Combination power law exponent

pf.eta.bc

queryclass

See BC::Constant

eta.ic.type

query

IC type - [packedspheres,laminate] - see classes for more information

thermal.on

query

These parameters are for the Thermal transport model Whether to use the thermal model

thermal.rho1

query

Density (before)

thermal.rho0

query

Density (after)

thermal.ka

query

Thermal conductivity (before and after)

thermal.kh

query

Thermal conductivity (before and after)

thermal.k0

query

Thermal conductivity (before and after)

thermal.cp1

query

Specific heat (before and after)

thermal.cp0

query

Specific heat (before and after)

thermal.delA

query

Thermal flux of each material

thermal.delH

query

Thermal flux of each material

amr.refinement_criterion

query

Refinement criterion for eta field

amr.refinement_criterion_temp

query

Refinement criterion for temperature field

amr.refinament_restriction

query

Eta value to restrict the refinament for the temperature field

phi.ic.type

query

IC type (psread, laminate, constant)

model_ap

queryclass

model_htpb

queryclass

Integrator::Fracture

Parameter

Type

Description

IC for crack field

crack.ic.type

queryarr

crack.ic.notch

queryclass

crack.ic.ellipsoid

queryclass

elastic.solver

queryclass

Solver::Nonlocal::Linear<brittle_fracture_model_type_test> solver(op_b);

Integrator::HeatConduction

This implements a basic heat conduction method in Alamo. The partial differential equation to be solved is

\[\frac{\partial T}{\partial t} = \alpha\,\Delta T\]

where \(T\) is temperature, \(t\) is time, and \(alpha\) is the thermal diffusivity. Integration is performed explicitly in time using forward Euler, and differentiation is performed using the finite difference method.

Parameter

Type

Description

The Parse function initializes the HeatConduction object using a parser, pp. Note that this is a static function, which means it does not have direct access to member variables. Instead, it initializes the variables inside the argument, “value”, and so all references to member items are prefixed by “value.”

[prefix].heat.alpha

query

Diffusion coefficient [1.0]

[prefix].heat.refinement_threshold

query

Criterion for mesh refinement [0.01]

[prefix].ic.type

query

Initial condition type ([sphere], constant, expression)

[prefix].bc.temp

queryclass

BC::Constant parameters with prefix bc.temp

Integrator::Mechanics

This is a general purpose integrator that focuses on solving elasticity/mechanics equations in the absence of other multiphysics simulations. It is enabled by alamo.program=mechanics if used on its own, in which case there is no prefix. If it is being used by another integrator, see that integrator to determine the value of [prefix] (often equal to elastic).

This integrator inherits from Integrator::Base::Mechanics; see documentation for that integrator for additional parameters.

Model setup There are two basic tools for setting up a mechanics problem in this integrator.

  1. The eta field: this is used to mix models of different types. Use nmodels to specify how many material models to use, and then specify each model as model1, model2, etc. The type of moel is specified using the alamo.program.mechanics.model input.

    Once you have done this, you must determine the spatial distribution of each model. This is done by choosing an IC for the eta field with ic.type. The IC::Expression is the most general and recommended. The models are then mixed linearly, i.e.

    \[W_{\textrm{eff}} = \sum_{i=1}^N W_i\,\eta_i(\mathbf{x})\]

    See the Eshelby test for an example of model mixing.

  2. The psi field: this is used specifically for cases where a “void” region is desired. Its usage is similar to the eta case, and is conceptually similar in that it scales the model field to near-zero in order to mimic the (lack of) mechanical behavior in an empty region. It is important to use psi here, for reasons that are discussed in detail in this paper. The initialization of psi is similar to that for eta.

    See the PlateHole and RubberPlateHole for canonical exmaples. The Integrator::Fracture and Integrator::TopOp integrators are examples of integrators that leverage the psi property.

Body forces currently have limited support due to the relatively low number of times they are needed. See the Integrator::Base::Mechanics documentation for detail. See the TrigTest test for examples of current body force implementation.

Boundary conditions are implemented using the BC::Operator::Elastic classes. See the documentation on these classes for more detail. See any of the mechanics-based tests for examples of boundary condition application.

Parameter

Type

Description

Mechanics inputs. See also Integrator::Base::Mechanics

[prefix].nmodels

query

Number of elastic model varieties

[prefix].eta_ref_threshold

query

Refinement threshold for eta field

[prefix].ref_threshold

query

Refinement threshold for strain gradient

[prefix].ic.type

query

Read IC type for the eta field

[prefix].eta.reset_on_regrid

query

Whether to re-initialize eta when re-gridding occurs. Default is false unless eta ic is set, then default is. true.

[prefix].psi.ic.type

query

Read IC type for the eta field

[prefix].psi.reset_on_regrid

query

Whether to re-initialize psi when re-gridding occurs. Default is false unless a psi ic is set, then default is true.

Integrator::PhaseFieldMicrostructure

file PhaseFieldMicrostructure.H

Parameter

Type

Description

[prefix].pf.number_of_grains

query

Number of grain fields (may be more if using different IC)

[prefix].pf.M

query

Mobility

[prefix].pf.mu

query

Phase field \(\mu\)

[prefix].pf.gamma

query

Phase field \(\gamma\)

[prefix].pf.sigma0

query

Initial GB energy if not using GB anisotropy

[prefix].pf.l_gb

query

Mobility

[prefix].pf.elastic_df

query

Determine whether to use elastic driving force

[prefix].pf.elastic_mult

query

Multiplier of elastic energy

[prefix].pf.elastic_threshold

query

Elastic threshold (\(\phi_0\))

[prefix].amr.max_level

query

Maximum AMR level

[prefix].amr.ref_threshold

query

Phase field refinement threshold

[prefix].mechanics.tstart

query

Elasticity

[prefix].mechanics.model

queryclass

By default, read in the model specified by “mechanics.model”

[prefix].lagrange.on

query

Lagrange multiplier method for enforcing volumes Turn on

[prefix].lagrange.lambda

query

Lagrange multiplier value

[prefix].lagrange.vol0

query

Prescribed volume

[prefix].lagrange.tstart

query

Time to start enforcing Lagrange multipler

[prefix].anisotropy.on

query

Anisotropic grain boundary energy parameters Turn on

[prefix].anisotropy.beta

query

Regularization param

[prefix].anisotropy.tstart

query

Time to turn on anisotropy

[prefix].anisotropy.timestep

query

Modify timestep when turned on

[prefix].anisotropy.plot_int

query

Modify plot_int when turned on

[prefix].anisotropy.plot_dt

query

Modify plot_dt when turned on

[prefix].anisotropy.thermo_int

query

Modify thermo int when turned on

[prefix].anisotropy.thermo_plot_int

query

Modify thermo plot int when turned on

[prefix].anisotropy.elastic_int

query

Frequency of elastic calculation

[prefix].anisotropy.regularization

query

Type of regularization to use

[prefix].anisotropy.gb_type

query

Set the anisotropic GB model Type of GB energy to use

[prefix].bc.eta.type

query

Type (constnat)

[prefix].ic.type

query

IC Type

Integrator::PolymerDegradation

file PolymerDegradation.H

Parameter

Type

Description

Water diffusion

water.on

query

water.diffusivity

query

Diffusivity

water.refinement_threshold

query

AMR refinement criterion

water.ic_type

query

water.ic.value

queryarr

water.ic.bc

queryclass

Integrator::SutureCrack

Parameter

Type

Description

IC for crack field

crack.ic.type

query

crack.ic.notch

queryclass

Integrator::ThermoElastic

Parameter

Type

Description

[prefix].hc

queryclass

[prefix].el

queryclass

[prefix].alpha

queryarr

Integrator::TopOp

Parameter

Type

Description

The mechanics integrator manages the solution of an elastic solve using the MLMG solver.

[prefix].model

queryclass

[prefix].psi.ic.type

query

Read IC type for the eta field

[prefix].eta_ref_threshold

query

[prefix].alpha

query

[prefix].beta

query

[prefix].gamma

query

[prefix].L

queryclass

[prefix].volume0frac

query

[prefix].volume0

query

[prefix].lambda

queryclass

Integrator::Base

Integrator::Base::Mechanics

Parameter

Type

Description

The mechanics integrator manages the solution of an elastic solve using the MLMG solver.

[prefix].type

query

[prefix].time_evolving

query

[prefix].solver

queryclass

Read parameters for Solver::Nonlocal::Newton solver

[prefix].viscous.mu

query

[prefix].bc.type

query

Determine the boundary condition type (contant, tension_test, expression)

[prefix].print_model

query

[prefix].rhs.type

query

Initializer for RHS

[prefix].interval

query

Timestep interval for elastic solves (default - solve every time)

[prefix].max_coarsening_level

query

Maximum multigrid coarsening level (default - none, maximum coarsening)

[prefix].print_residual

query

[prefix].elastic_ref_threshold

query

Whether to refine based on elastic solution

[prefix].zero_out_displacement

query

Set this to true to zero out the displacement before each solve. (This is a temporary fix - we need to figure out why this is needed.)


Model

In Alamo, any type of constitutive behavior is encapsulated in a “Model”. There is a broad range of model types, and so there is no abstract Model class. Rather, the base Model classes are stored in subsets of Model.

Model::Interface

Model::Interface::Crack

Model::Interface::Crack::Constant

Parameter

Type

Description

[prefix].G_c

query

[prefix].zeta

query

[prefix].mobility

query

[prefix].threshold

query

[prefix].gtype

query

[prefix].wtype

query

[prefix].exponent

query

Model::Interface::Crack::Sin

Parameter

Type

Description

[prefix].Gc0

query

[prefix].Gc1

query

[prefix].theta0

query

[prefix].zeta

query

[prefix].mobility

query

[prefix].threshold

query

[prefix].gtype

query

[prefix].wtype

query

[prefix].exponent

query

Model::Interface::GB

Model::Interface::GB::AbsSin

Parameter

Type

Description

[prefix].theta0

query

[prefix].sigma0

query

convert degrees into radians

[prefix].sigma1

query

Model::Interface::GB::Read

Parameter

Type

Description

[prefix].filename

query

Model::Interface::GB::Sin

Parameter

Type

Description

[prefix].theta0

query

[prefix].sigma0

query

convert degrees into radians

[prefix].sigma1

query

[prefix].n

query

Model::Interface::GB::SH

Parameter

Type

Description

[prefix].theta0

query

[prefix].phi0

query

convert degrees into radians

[prefix].sigma0

query

convert degrees into radians

[prefix].sigma1

query

[prefix].regularization

query

Model::Solid

Solid models are used with the Integrator::Mechanics integrator, which implements the Solver::Nonlocal::Newton elasticity solver. All solid models inherit from the Model::Solid base class, which requires all of the necessary components to be used in a mechanics solve. Model classes have basically two functions:

  1. Provide energy (W), stress (DW), and modulus (DDW) based on a kinematic variable

  2. Evolve internal variables in time.

Model::Solid::Affine

“Affine” generally means “linear with an offset”. Here we use “affine” to refer to models that are elastic with an eigenstrain, i.e.

\[\sigma = \mathbb{C}(\varepsilon - \varepsilon_0)\]

The quantity \(\varepsilon_0\) is any kind of eigenstrain - examples include thermal strain, plastic strain, or viscous strain. This class can be used directly, where the eigenstrain is read in or set by the integrator. There are also classes (particularly visco/plastic models) that inherit from this type of model.

Model::Solid::Affine::Cubic

Parameter

Type

Description

This class extends Model::Solid::Linear::Cubic by adding an eigenstrain. (See the Linear::Cubic class for more inputs for this model)

[prefix].F0

queryarr

Eigenstrain

Model::Solid::Affine::CubicDegradable

Parameter

Type

Description

This class inherits from Model::Solid::Affine::Cubic. It provides the ability to “degrade” while retaining information about its original, pristine state

[prefix].C11

query

Original, undegraded \(\mathbb{C}_{11}\)

[prefix].C12

query

Original, undegraded \(\mathbb{C}_{12}\)

[prefix].C44

query

Original, undegraded \(\mathbb{C}_{44}\)

[prefix].phi1

query

Bunge Euler angles \(\phi_1\)

[prefix].Phi

query

Bunge Euler angles \(\Phi\)

[prefix].phi2

query

Bunge Euler angles \(\phi_2\)

Model::Solid::Affine::Hexagonal

Parameter

Type

Description

[prefix].F0

queryarr

Eigenstrain

Model::Solid::Affine::Isotropic

Parameter

Type

Description

[prefix].lame

query

Lame modulus

[prefix].shear

query

Shear modulus

[prefix].E

query

Elastic modulus

[prefix].nu

query

Poisson’s ratio

[prefix].E

query

[prefix].shear

query

[prefix].E

query

[prefix].lame

query

[prefix].nu

query

[prefix].shear

query

[prefix].lambda

query

[prefix].nu

query

[prefix].bulk

query

[prefix].shear

query

[prefix].F0

queryarr

Eigendeformation gradient

Model::Solid::Affine::IsotropicDegradable

Parameter

Type

Description

[prefix].lame

query

[prefix].shear

query

[prefix].E

query

[prefix].nu

query

Model::Solid::Affine::J2Plastic

Parameter

Type

Description

[prefix].lambda

query

[prefix].mu

query

[prefix].E

query

[prefix].nu

query

[prefix].yield

query

[prefix].hardening

query

[prefix].theta

query

Model::Solid::Affine::J2

This models an isotropic elastic-perfectly-plastic, non-time-dependent solid model.

The energy and derivatives are:

\begin{gather} W = \frac{1}{2}(\varepsilon - \varepsilon_p):\mathbb{C}(\varepsilon-\varepsilon_p) \\ DW = \mathbb{C}(\varepsilon-\varepsilon_p) \\ DDW = \mathbb{C} \end{gather}

where \(\mathbb{C}\) is an isotropic Set::Matrix4 and \(\varepsilon_p\) is is stored in the F0 eigenstrain.

The plastic strain is evolved according to the following:

  1. Calculate the deviatoric stress \(\sigma_v=\sigma - \frac{1}{3}tr(\sigma)\mathbf{I}\)

  2. Calculate \(J_2=\sqrt{\frac{3}{2}\sigma_v:\sigma_v}\)

  3. If \(J_2<\sigma_0\) then quit - no plasticity occurs

  4. Calculate \(\Delta\sigma = (1-\frac{\sigma_0}{J_2})\), which projects the stress back on the yield surface.

  5. Convert to change in plastic strain, \(\Delta\varepsilon=\mathbb{C}^{-1}\Delta\sigma\)

  6. Update plastic strain: \(\varepsilon_p += \Delta\varepsilon\)

Notes:

  • This does not implement any kind of hardening model. Rate hardening, isotropic hardening, and kinematic hardening have yet to be implemneted.

Parameter

Type

Description

See also inputs to Model::Solid::Affine::Isotropic

[prefix].sigma0

query

J2 Yield criterion

Model::Solid::Affine::J2PlasticDegradable

Parameter

Type

Description

[prefix].lambda

query

[prefix].mu

query

[prefix].E

query

[prefix].nu

query

[prefix].yield

query

[prefix].hardening

query

[prefix].theta

query

Model::Solid::Elastic

Model::Solid::Elastic::NeoHookean

Parameter

Type

Description

[prefix].mu

query

[prefix].kappa

query

Model::Solid::Elastic::PseudoLinearCubic

Parameter

Type

Description

[prefix].C11

query

Elastic constant (default: 1.68)

[prefix].C12

query

Elastic constant (default: 1.21)

[prefix].C44

query

Elastic constant (default: 0.75)

[prefix].phi1

query

Bunge Euler angle \(\phi_1\)

[prefix].Phi

query

Bunge Euler angle \(\Phi\)

[prefix].phi2

query

Bunge Euler angle \(\phi_2\)

Model::Solid::Linear

Model::Solid::Linear::Cubic

This class implements basic cubic elasticity. For a discussion on cubic elasticity, please see this link.

Parameter

Type

Description

[prefix].C11

query

Elastic constant (default: 1.68)

[prefix].C12

query

Elastic constant (default: 1.21)

[prefix].C44

query

Elastic constant (default: 0.75)

[prefix].phi1

query

Bunge Euler angle \(\phi_1\)

[prefix].Phi

query

Bunge Euler angle \(\Phi\)

[prefix].phi2

query

Bunge Euler angle \(\phi_2\)

Model::Solid::Linear::Hexagonal

This class implements basic hexagonal elasticity.

Parameter

Type

Description

[prefix].C11

query

Elastic constant

[prefix].C12

query

Elastic constant

[prefix].C13

query

Elastic constant

[prefix].C33

query

Elastic constant

[prefix].C44

query

Elastic constant

[prefix].phi1

query

Bunge Euler angle \(\phi_1\)

[prefix].Phi

query

Bunge Euler angle \(\Phi\)

[prefix].phi2

query

Bunge Euler angle \(\phi_2\)

Model::Solid::Linear::Isotropic

This model implements an isotropic linear elastic material. See this link for more information about the theory.

Free energy for a linear material is defined as

\[W(\nabla\mathbf{u}) = \frac{1}{2}\nabla\mathbf{u}\cdot\mathbb{C}\,\nabla\mathbf{u}\]

For an isotropic material, stress and strain are related through

\[\mathbb{C}_{ijkl} = \lambda \delta_{ij}\varepsilon_{kk} + 2\mu\varepsilon_{ij}\]

where \(\lambda\) and \(\mu\) are the Lame constant and shear modulus, respectively. Users can specify these either through (lame and shear) OR (lambda and mu) OR (E and nu).

Class methods:

  1. Isotropic(): Basic constructor. Does nothing, and leaves all values initiated as NAN.

  2. Isotropic(Solid<Set::Sym::Isotropic> base) Basic constructor. Does nothing gut allows for inheritance.

  3. Isotropic(Set::Scalar a_mu, Set::Scalar a_lambda) BAD old-fashioned constructor. Do not use!

  4. ~Isotropic() Simple destructor. Don’t need to change it.

  5. void Define(Set::Scalar a_mu, Set::Scalar a_lambda) BAD old-fashioned way of doing things. Use Parse instead.

  6. Set::Scalar W(const Set::Matrix & gradu) const override Returns elastic free energy density

  7. Set::Matrix DW(const Set::Matrix & gradu) const override Returns first derivative of free energy, the stress tensor

  8. Set::Matrix4<...> DDW(const Set::Matrix & ) const override Returns second derivative of free energy, the modulus tensor

  9. virtual void Print(std::ostream &out) const override Prints the modulus tensor object to output stream (usually the terminal)

  10. static Isotropic Random() Static method that generates a random yet acceptable model.

  11. static Isotropic Zero() Static method that generates a “zero” element (so that there is no effect under addition)

  12. static void Parse(Isotropic & value, IO::ParmParse & pp) Parser where all the IO occurs

Parameter

Type

Description

[prefix].planestress

query

Whether or not to use the plane stress approximation.

[prefix].lame

query

Lame parameter

[prefix].shear

query

Shear modulus (redundant with “mu”)

[prefix].lambda

query

Lame parameter

[prefix].mu

query

Shear modulus (redundant with “shear”)

[prefix].E

query

Elastic modulus

[prefix].nu

query

Poisson’s ratio

Model::Solid::Linear::IsotropicDegradableTanh

Parameter

Type

Description

[prefix].E1

query

[prefix].E2

query

[prefix].Tg

query

[prefix].Ts

query

[prefix].nu

query

[prefix].temp

query

Model::Solid::Linear::IsotropicDegradable

Parameter

Type

Description

[prefix].lambda

query

[prefix].mu

query

[prefix].E

query

[prefix].nu

query

Model::Solid::Linear::Laplacian

Parameter

Type

Description


Numeric

Numeric::Interpolator

This namespace has evolved to contain some general Interpolator routines that are actually unrelated. The Numeric::Interpolator::Linear is an I/O utility. The Numeric::Interpolator::NodeBilinear is a low-level AMReX override that the average user (or even coder) will probably not need to touch.

Numeric::Interpolator::Linear

This is a general-purpose routine for specifying time-interpolated quantities in an input file. Interpolators obey the following syntax:

(t1,t2,..,tn;v1,v2,...,vn)

where tn are times and vn are values at those times.

Note: do not include whitespace in an interpolator, this will mess with the parser.

Interpolators can usually be used in place of regular numbers, but only when supported by the calling parse function.

For instance, the BC::Operator::Elastic::TensionTest allows the user to specify fixed displacement; for instance, to specify a value of 0.1:

bc.tenstion_test.disp = 0.1

However, it may be desirable to change the value over time. In this case, one may specify an interpolator string instead:

bc.tenstion_test.disp = (1.0,1.5,2.0;0.0,0.1,0.0)

This will cause the displacement value to be zero for t<1.0; ramp to 0.1 as 1.0<t<2.0; ramp back to 0.0 as 2.0<t<3.0; and then remain at the constant value of 3.0 for t>3.0.

Parameter

Type

Description

[prefix].str

query

Interpolator string used when Parsed from queryclass.

Numeric::Interpolator::NodeBilinear

Provide an interpolator function that can work with templated fields.

Warning: This is a low-level class used to add templating functionality to unerlying AMReX classes. Edit at your own risk!


Operator

Operator::Elastic

Parameter

Type

Description

[prefix].small

query


Set

The Set namespace defines the Alamo datatypes. This includes scalars (Set::Scalar), vectors (Set::Vector), and nD tensors (Set::Tensor). Scalars are an alias for AMReX Real. Vectors and tensors are an alias for the Tuxfamily Eigen vectors and matrices, and so you can use Eigen operations on them (like A.determinant(), etc.) See the Eigen documentation for more.

The Set namespace defines the Matrix4 datatype for fourth order tensors. These can have isotropic, major, minor, majorminor, etc., symmetries.

The Set namespace also defines the Field datatype, which is where most data is stored. It is templated so that Set::Field<Set::Scalar> is a field of scalars, Set::Field<Set::Vector> is a vector field, etc. One can also have, for instance, a field of models, like Set::Field<Model::Solid::Linear::Iostropic>.


Solver

Solver::Nonlocal

Solver::Nonlocal::Linear

Parameter

Type

Description

These are the parameters that are read in for a standard multigrid linear solve.

[prefix].max_iter

query

Max number of iterations to perform before erroring out

[prefix].bottom_max_iter

query

Max number of iterations on the bottom solver

[prefix].max_fmg_iter

query

Max number of F-cycle iterations to perform

[prefix].fixed_iter

query

Number of fixed iterations to perform before exiting gracefully

[prefix].verbose

query

Verbosity of the solver (1-5)

[prefix].pre_smooth

query

Number of smoothing operations before bottom solve (2)

[prefix].post_smooth

query

Number of smoothing operations after bottom solve (2)

[prefix].final_smooth

query

Number of final smoothing operations when smoother is used as bottom solver (8)

[prefix].bottom_smooth

query

Additional smoothing after bottom CG solver (0)

[prefix].bottom_solver

query

The method that is used for the multigrid bottom solve (cg, bicgstab, smoother)

[prefix].bottom_tol_rel

query

Relative tolerance on bottom solver

[prefix].bottom_tol_abs

query

Absolute tolerance on bottom solver

[prefix].tol_rel

query

Relative tolerance

[prefix].tol_abs

query

Absolute tolerance

[prefix].omega

query

Omega (used in gauss-seidel solver)

[prefix].average_down_coeffs

query

Whether to average down coefficients or use the ones given. (Setting this to true is important for fracture.)

[prefix].normalize_ddw

query

Whether to normalize DDW when calculating the diagonal. This is primarily used when DDW is near-singular - like when there is a “void” region or when doing phase field fracture.

[prefix].dump_on_fail

query

[false] If set to true, output diagnostic multifab information whenever the MLMG solver fails to converge. (Note: you must also set amrex.signalhandling=0 and amrex.throw_exception=1 for this to work.)

[prefix].abort_on_fail

query

[true] If set to false, MLMG will not die if convergence criterion is not reached. (Note: you must also set amrex.signalhandling=0 and amrex.throw_exception=1 for this to work.)

Solver::Nonlocal::Newton

Parameter

Type

Description

These paramters control a standard Newton-Raphson solve.

Note: This class inherits all of the linear solve paramters from its parent class, Solver::Nonlocal::Linear

[prefix].nriters

query

Number of newton-raphson iterations.

[prefix].nrtolerance

query


Util