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 |
---|---|
|
Standard Dirichlet boundary condition (https://en.wikipedia.org/wiki/Dirichlet_boundary_condition). Fixes the value of the function at the boundary. |
|
|
|
|
|
Standard Neumann boundary condition (https://en.wikipedia.org/wiki/Neumann_boundary_condition) |
|
|
|
Standard periodic boundary condition.
(https://en.wikipedia.org/wiki/Periodic_boundary_conditions).
Important: Ensure that your geometry is specified to be
periodic using |
|
|
|
|
|
Effectively the same as dirichlet but with value fixed to 0 |
|
|
|
Effectively the same as neumann but with value fixed to 0 |
|
Used for internal operations - not for general use |
|
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. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
---|---|---|
|
queryarr |
BC type on the lower x edge (2d) face (3d) |
|
queryarr |
BC type on the upper x edge (2d) face (3d) |
|
queryarr |
BC type on the lower y edge (2d) face (3d) |
|
queryarr |
BC type on the upper y edge (2d) face (3d) |
|
queryarr |
BC type on the lower z face (processed but ignored in 2d to prevent unused input errors) |
|
queryarr |
BC type on the upper z face (processed but ignored in 2d to prevent unused input errors) |
|
queryarr |
BC value on the lower x edge (2d) face (3d) |
|
queryarr |
BC value on the upper x edge (2d) face (3d) |
|
queryarr |
BC value on the lower y edge (2d) face (3d) |
|
queryarr |
BC value on the upper y edge (2d) face (3d) |
|
queryarr |
BC value on the lower z face (processed but ignored in 2d to prevent unused input errors) |
|
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 |
---|---|---|
|
query |
Location of the step on the xlo edge/face |
|
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 |
---|---|---|
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face |
|
queryarr |
3D Face |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Face / 2D Edge |
|
queryarr |
3D Face / 2D Edge |
|
queryarr |
3D Face / 2D Edge |
|
queryarr |
3D Face / 2D Edge |
|
queryarr |
3D Face |
|
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. |
||
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Corner |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Edge / 2D Corner |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face 2D Edge |
|
queryarr |
3D Face |
|
queryarr |
3D Face |
BC::Operator::Elastic::TensionTest
Parameter |
Type |
Description |
---|---|---|
|
query |
Tension test type. (Only option right now is |
|
query |
Applied displacement (can be interpolator) |
|
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 |
---|---|---|
|
queryarr |
Normal vector for hyperplane |
|
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 |
---|---|---|
|
query |
BMP filename. |
|
query |
How to fit. (options: stretch, fitheight, fitwidth) |
|
query |
Color channel to use (options: r, R, g, G, b, B) |
|
query |
Scaling value - minimum (default: 0.0) |
|
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 |
---|---|---|
|
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 |
---|---|---|
|
queryarr |
Coordinates (X Y Z) of the center of the square/cube. |
|
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 |
---|---|---|
|
query |
Thickness of the notches |
|
query |
Width of the notches |
|
queryarr |
Center of the notches |
|
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 |
---|---|---|
|
queryarr |
Coorinates of ellipse center |
|
query |
Diffuse boundary thickness |
|
queryarr |
DxD square matrix defining an ellipse. |
|
queryarr |
If |
|
query |
Number of ellipses |
|
queryarr |
center of the ellipse |
|
queryarr |
either a vector containing ellipse radii, or a matrix defining the ellipse |
|
queryarr |
Same |
|
queryarr |
Array of radii [depricated] |
|
queryarr |
Regularization for smooth boundary |
|
query |
Flip the inside and the outside |
IC::Ellipsoid
This IC initializes a single-component fab using the formula
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 |
---|---|---|
|
queryarr |
Center of the ellipse \(\mathbf{x}_0\) |
|
queryarr |
Matrix defining elipse radii and orientation |
|
queryarr |
“Vector of radii (use instead of A)” |
|
queryarr |
Mollifying value for erf |
|
query |
Value of field inside ellipse (default: 0) |
|
query |
Value of field outside ellipse (default: 1) |
|
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 |
---|---|---|
|
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 |
---|---|---|
|
query |
How many laminates (MUST be greater than or equal to 1). Default = 1 |
|
queryarr |
(x,y,[z]) values for the center point of the laminate |
|
queryarr |
thickness of the laminate |
|
queryarr |
Vector normal to the interface of the laminate |
|
queryarr |
Diffuse thickness |
|
query |
Type of mollifer to use (options: dirac, [gaussian]) |
|
query |
Switch to mode where only one component is used. |
|
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 |
---|---|---|
|
queryarr |
Center of notch |
|
queryarr |
Vector describing notch orientation |
|
queryarr |
Thickness of notch |
|
queryarr |
Length of notch |
|
queryarr |
Radius of notch ends |
|
query |
Magnitude of 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 |
---|---|---|
|
queryarr |
Wave numbers |
|
queryarr |
Wave amplitudes |
|
query |
Which axis is normal to the interface (x,y,z) |
|
query |
Interface offset from origin |
|
query |
If true, flip the interface (default:false) |
|
query |
Mollifier (options: dirac, [gaussian]) |
|
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 |
---|---|---|
|
query |
|
|
query |
|
|
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 |
---|---|---|
|
query |
Diffuseness of the sphere boundary |
|
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. |
||
|
query |
Radius of the sphere |
|
queryarr |
Vector location of the sphere center |
|
query |
Value of the field inside the sphere |
|
query |
Value of the field outside teh sphere |
|
query |
Type - can be cylinder oriented along the x, y, z directions or full sphere. |
IC::Trig
Parameter |
Type |
Description |
---|---|---|
|
queryarr |
|
|
queryarr |
|
|
query |
|
|
query |
IC::TabulatedInterface
Parameter |
Type |
Description |
---|---|---|
|
queryarr |
|
|
queryarr |
IC::Voronoi
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
queryarr |
|
|
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. |
||
|
query |
Number of iterations before ending |
|
query |
Simulation time before ending |
|
query |
Nominal timestep on amrlev = 0 |
|
query |
Name of restart file to READ from |
|
query |
Name of cell-fab restart file to read from |
|
query |
Name of node-fab restart file to read from |
|
queryarr |
Space-separated list of entries to ignore |
These are parameters that are specific to the AMR/regridding part of the code. |
||
|
query |
Regridding interval in step numbers |
|
query |
Regridding interval based on coarse level only |
|
query |
Interval (in timesteps) between plotfiles |
|
query |
Interval (in simulation time) between plotfiles |
|
query |
Output file |
|
query |
Turn on to write all output in cell fabs (default: off) |
|
query |
Turn off to prevent any cell based output (default: on) |
|
query |
Turn on to write all output in node fabs (default: off) |
|
query |
Turn off to prevent any node based output (default: on) |
|
query |
Specify a maximum level of refinement for output files |
|
queryarr |
Number of substeps to take on each level (default: 2) |
|
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) |
||
|
query |
Default: integrate every time. Integration interval (1) |
|
query |
Interval (in timesteps) between writing |
|
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. |
||
|
query |
Use explicit mesh instead of AMR |
Integrator::CahnHilliard
CahnHilliard
Integrator::Flame
Parameter |
Type |
Description |
---|---|---|
|
query |
Burn width thickness |
|
query |
Interface energy param |
|
query |
Scaling factor for mobility |
|
query |
Chemical potential multiplier |
|
query |
Unburned rest energy |
|
query |
Barrier energy |
|
query |
Burned rest energy |
|
query |
Pressure [UNITS?] |
|
query |
AP Power law multiplier |
|
query |
AP Power law exponent |
|
query |
HTPB Power law multiplier |
|
query |
HTPB Power law exponent |
|
query |
Combination power law multiplier |
|
query |
Combination power law exponent |
|
queryclass |
See BC::Constant |
|
query |
IC type - [packedspheres,laminate] - see classes for more information |
|
query |
These parameters are for the Thermal transport model Whether to use the thermal model |
|
query |
Density (before) |
|
query |
Density (after) |
|
query |
Thermal conductivity (before and after) |
|
query |
Thermal conductivity (before and after) |
|
query |
Thermal conductivity (before and after) |
|
query |
Specific heat (before and after) |
|
query |
Specific heat (before and after) |
|
query |
Thermal flux of each material |
|
query |
Thermal flux of each material |
|
query |
Refinement criterion for eta field |
|
query |
Refinement criterion for temperature field |
|
query |
Eta value to restrict the refinament for the temperature field |
|
query |
IC type (psread, laminate, constant) |
|
queryclass |
|
|
queryclass |
Integrator::Fracture
Parameter |
Type |
Description |
---|---|---|
IC for crack field |
||
|
queryarr |
|
|
queryclass |
|
|
queryclass |
|
|
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
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.” |
||
|
query |
Diffusion coefficient [1.0] |
|
query |
Criterion for mesh refinement [0.01] |
|
query |
Initial condition type ([sphere], constant, expression) |
|
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.
The
eta
field: this is used to mix models of different types. Usenmodels
to specify how many material models to use, and then specify each model asmodel1
,model2
, etc. The type of moel is specified using thealamo.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
. TheIC::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.
The
psi
field: this is used specifically for cases where a “void” region is desired. Its usage is similar to theeta
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 usepsi
here, for reasons that are discussed in detail in this paper. The initialization ofpsi
is similar to that foreta
.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 |
||
|
query |
Number of elastic model varieties |
|
query |
Refinement threshold for eta field |
|
query |
Refinement threshold for strain gradient |
|
query |
Read IC type for the eta field |
|
query |
Whether to re-initialize eta when re-gridding occurs. Default is false unless eta ic is set, then default is. true. |
|
query |
Read IC type for the eta field |
|
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 |
---|---|---|
|
query |
Number of grain fields (may be more if using different IC) |
|
query |
Mobility |
|
query |
Phase field \(\mu\) |
|
query |
Phase field \(\gamma\) |
|
query |
Initial GB energy if not using GB anisotropy |
|
query |
Mobility |
|
query |
Determine whether to use elastic driving force |
|
query |
Multiplier of elastic energy |
|
query |
Elastic threshold (\(\phi_0\)) |
|
query |
Maximum AMR level |
|
query |
Phase field refinement threshold |
|
query |
Elasticity |
|
queryclass |
By default, read in the model specified by “mechanics.model” |
|
query |
Lagrange multiplier method for enforcing volumes Turn on |
|
query |
Lagrange multiplier value |
|
query |
Prescribed volume |
|
query |
Time to start enforcing Lagrange multipler |
|
query |
Anisotropic grain boundary energy parameters Turn on |
|
query |
Regularization param |
|
query |
Time to turn on anisotropy |
|
query |
Modify timestep when turned on |
|
query |
Modify plot_int when turned on |
|
query |
Modify plot_dt when turned on |
|
query |
Modify thermo int when turned on |
|
query |
Modify thermo plot int when turned on |
|
query |
Frequency of elastic calculation |
|
query |
Type of regularization to use |
|
query |
Set the anisotropic GB model Type of GB energy to use |
|
query |
Type (constnat) |
|
query |
IC Type |
Integrator::PolymerDegradation
file PolymerDegradation.H
Parameter |
Type |
Description |
---|---|---|
Water diffusion |
||
|
query |
|
|
query |
Diffusivity |
|
query |
AMR refinement criterion |
|
query |
|
|
queryarr |
|
|
queryclass |
Integrator::SutureCrack
Parameter |
Type |
Description |
---|---|---|
IC for crack field |
||
|
query |
|
|
queryclass |
Integrator::ThermoElastic
Parameter |
Type |
Description |
---|---|---|
|
queryclass |
|
|
queryclass |
|
|
queryarr |
Integrator::TopOp
Parameter |
Type |
Description |
---|---|---|
The mechanics integrator manages the solution of an elastic solve using the MLMG solver. |
||
|
queryclass |
|
|
query |
Read IC type for the eta field |
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
queryclass |
|
|
query |
|
|
query |
|
|
queryclass |
Integrator::Base
Integrator::Base::Mechanics
Parameter |
Type |
Description |
---|---|---|
The mechanics integrator manages the solution of an elastic solve using the MLMG solver. |
||
|
query |
|
|
query |
|
|
queryclass |
Read parameters for Solver::Nonlocal::Newton solver |
|
query |
|
|
query |
Determine the boundary condition type (contant, tension_test, expression) |
|
query |
|
|
query |
Initializer for RHS |
|
query |
Timestep interval for elastic solves (default - solve every time) |
|
query |
Maximum multigrid coarsening level (default - none, maximum coarsening) |
|
query |
|
|
query |
Whether to refine based on elastic solution |
|
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 |
---|---|---|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
Model::Interface::Crack::Sin
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
Model::Interface::GB
Model::Interface::GB::AbsSin
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
convert degrees into radians |
|
query |
Model::Interface::GB::Read
Parameter |
Type |
Description |
---|---|---|
|
query |
Model::Interface::GB::Sin
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
convert degrees into radians |
|
query |
|
|
query |
Model::Interface::GB::SH
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
convert degrees into radians |
|
query |
convert degrees into radians |
|
query |
|
|
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:
Provide energy (W), stress (DW), and modulus (DDW) based on a kinematic variable
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.
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) |
||
|
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 |
||
|
query |
Original, undegraded \(\mathbb{C}_{11}\) |
|
query |
Original, undegraded \(\mathbb{C}_{12}\) |
|
query |
Original, undegraded \(\mathbb{C}_{44}\) |
|
query |
Bunge Euler angles \(\phi_1\) |
|
query |
Bunge Euler angles \(\Phi\) |
|
query |
Bunge Euler angles \(\phi_2\) |
Model::Solid::Affine::Hexagonal
Parameter |
Type |
Description |
---|---|---|
|
queryarr |
Eigenstrain |
Model::Solid::Affine::Isotropic
Parameter |
Type |
Description |
---|---|---|
|
query |
Lame modulus |
|
query |
Shear modulus |
|
query |
Elastic modulus |
|
query |
Poisson’s ratio |
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
queryarr |
Eigendeformation gradient |
Model::Solid::Affine::IsotropicDegradable
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
|
|
query |
|
|
query |
Model::Solid::Affine::J2Plastic
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
Model::Solid::Affine::J2
This models an isotropic elastic-perfectly-plastic, non-time-dependent solid model.
The energy and derivatives are:
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:
Calculate the deviatoric stress \(\sigma_v=\sigma - \frac{1}{3}tr(\sigma)\mathbf{I}\)
Calculate \(J_2=\sqrt{\frac{3}{2}\sigma_v:\sigma_v}\)
If \(J_2<\sigma_0\) then quit - no plasticity occurs
Calculate \(\Delta\sigma = (1-\frac{\sigma_0}{J_2})\), which projects the stress back on the yield surface.
Convert to change in plastic strain, \(\Delta\varepsilon=\mathbb{C}^{-1}\Delta\sigma\)
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 |
||
|
query |
J2 Yield criterion |
Model::Solid::Affine::J2PlasticDegradable
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
Model::Solid::Elastic
Model::Solid::Elastic::NeoHookean
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
Model::Solid::Elastic::PseudoLinearCubic
Parameter |
Type |
Description |
---|---|---|
|
query |
Elastic constant (default: 1.68) |
|
query |
Elastic constant (default: 1.21) |
|
query |
Elastic constant (default: 0.75) |
|
query |
Bunge Euler angle \(\phi_1\) |
|
query |
Bunge Euler angle \(\Phi\) |
|
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 |
---|---|---|
|
query |
Elastic constant (default: 1.68) |
|
query |
Elastic constant (default: 1.21) |
|
query |
Elastic constant (default: 0.75) |
|
query |
Bunge Euler angle \(\phi_1\) |
|
query |
Bunge Euler angle \(\Phi\) |
|
query |
Bunge Euler angle \(\phi_2\) |
Model::Solid::Linear::Hexagonal
This class implements basic hexagonal elasticity.
Parameter |
Type |
Description |
---|---|---|
|
query |
Elastic constant |
|
query |
Elastic constant |
|
query |
Elastic constant |
|
query |
Elastic constant |
|
query |
Elastic constant |
|
query |
Bunge Euler angle \(\phi_1\) |
|
query |
Bunge Euler angle \(\Phi\) |
|
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
For an isotropic material, stress and strain are related through
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:
Isotropic()
: Basic constructor. Does nothing, and leaves all values initiated as NAN.Isotropic(Solid<Set::Sym::Isotropic> base)
Basic constructor. Does nothing gut allows for inheritance.Isotropic(Set::Scalar a_mu, Set::Scalar a_lambda)
BAD old-fashioned constructor. Do not use!~Isotropic()
Simple destructor. Don’t need to change it.void Define(Set::Scalar a_mu, Set::Scalar a_lambda)
BAD old-fashioned way of doing things. UseParse
instead.Set::Scalar W(const Set::Matrix & gradu) const override
Returns elastic free energy densitySet::Matrix DW(const Set::Matrix & gradu) const override
Returns first derivative of free energy, the stress tensorSet::Matrix4<...> DDW(const Set::Matrix & ) const override
Returns second derivative of free energy, the modulus tensorvirtual void Print(std::ostream &out) const override
Prints the modulus tensor object to output stream (usually the terminal)static Isotropic Random()
Static method that generates a random yet acceptable model.static Isotropic Zero()
Static method that generates a “zero” element (so that there is no effect under addition)static void Parse(Isotropic & value, IO::ParmParse & pp)
Parser where all the IO occurs
Parameter |
Type |
Description |
---|---|---|
|
query |
Whether or not to use the plane stress approximation. |
|
query |
Lame parameter |
|
query |
Shear modulus (redundant with “mu”) |
|
query |
Lame parameter |
|
query |
Shear modulus (redundant with “shear”) |
|
query |
Elastic modulus |
|
query |
Poisson’s ratio |
Model::Solid::Linear::IsotropicDegradableTanh
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
|
|
query |
Model::Solid::Linear::IsotropicDegradable
Parameter |
Type |
Description |
---|---|---|
|
query |
|
|
query |
|
|
query |
|
|
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 |
---|---|---|
|
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 |
---|---|---|
|
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. |
||
|
query |
Max number of iterations to perform before erroring out |
|
query |
Max number of iterations on the bottom solver |
|
query |
Max number of F-cycle iterations to perform |
|
query |
Number of fixed iterations to perform before exiting gracefully |
|
query |
Verbosity of the solver (1-5) |
|
query |
Number of smoothing operations before bottom solve (2) |
|
query |
Number of smoothing operations after bottom solve (2) |
|
query |
Number of final smoothing operations when smoother is used as bottom solver (8) |
|
query |
Additional smoothing after bottom CG solver (0) |
|
query |
The method that is used for the multigrid bottom solve (cg, bicgstab, smoother) |
|
query |
Relative tolerance on bottom solver |
|
query |
Absolute tolerance on bottom solver |
|
query |
Relative tolerance |
|
query |
Absolute tolerance |
|
query |
Omega (used in gauss-seidel solver) |
|
query |
Whether to average down coefficients or use the ones given. (Setting this to true is important for fracture.) |
|
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. |
|
query |
[false]
If set to true, output diagnostic multifab information
whenever the MLMG solver fails to converge.
(Note: you must also set |
|
query |
[true]
If set to false, MLMG will not die if convergence criterion
is not reached.
(Note: you must also set |
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 |
||
|
query |
Number of newton-raphson iterations. |
|
query |