Initial conditions

The optional top-level initial conditions section sets the displacement and velocity fields at t₀. It holds three lists: displacement, velocity, and traveling wave.

initial conditions:
  displacement:
    - node set: nsall
      component: z
      function: "0.001 * x"
  velocity:
    - node set: nsall
      component: x
      function: "100.0 * sin(pi * y)"

Each of the three keys must hold a list, even for a single entry. A scalar or mapping raises e.g. initial conditions.displacement must be a list.

Misspelled keys are reported

A typo in a list key warns:

[WARNING] Unknown key "velocities" in initial conditions. Did you mean "velocity"?

A typo in an entry key warns and then aborts, because the field it stands in for is required:

[WARNING] Unknown key "nodeset" in displacement IC entry 1. Did you mean "node set"?
ERROR: displacement IC entry 1 is missing required key "node set".
       Need: node set, component, function.

A typo in the section key (initial condition:) is caught by top-level validation, which warns the same way.

Carina releases before this behaviour left all three unvalidated, so a misspelling meant the initial condition was silently never applied and the run started from rest — indistinguishable from a physics result. If you are reading an older input file that behaved oddly, that is worth checking.

Displacement and velocity

KeyRequiredDescription
node setyesExodus node set name.
componentyesx, y, or z.
functionyesExpression in x, y, z, t. See Function expressions.

Only free degrees of freedom receive initial values; DOFs constrained by a Dirichlet condition are skipped, and their values come from the boundary condition instead.

Integrator support

Integratordisplacementvelocitytraveling wave
quasi staticappliedignoredignored
newmarkappliedappliedapplied
central differenceappliedappliedapplied

Velocity and traveling-wave conditions are meaningful only to the dynamic integrators. Quasi-static runs drop them with a warning rather than an error:

[WARNING] Initial velocity ICs ignored for non-Newmark integrator.

The message says "non-Newmark"; it applies to any non-dynamic integrator, which in practice means quasi-static.

Traveling wave

A traveling-wave condition sets a displacement profile and the velocity field consistent with it propagating along an axis, without you having to write the derivative by hand.

initial conditions:
  traveling wave:
    - node set: nsall
      component: z
      displacement: "a=1.0e-3; s=0.1; a*exp(-(x-0.5)^2/s^2)"
      direction: x
      wave speed: 1000.0
KeyRequiredDescription
node setyesExodus node set name.
componentyesx, y, or z — the displaced component.
displacementyesExpression for the initial profile u₀.
directionyesPropagation axis: x, y, or z.
wave speedyesSigned speed c.

All five keys are required and validated; a missing one is a hard error naming the key, and direction must be x, y, or z.

Given u(x, t) = u₀(s − c t) with s the coordinate along the propagation axis, the consistent initial velocity is

v(x, 0) = −c · ∂u₀/∂s

Carina forms ∂u₀/∂s by symbolic differentiation of your displacement expression with respect to the direction axis, then evaluates both fields at t₀. There is no finite differencing and no automatic differentiation at initialization time.

wave speed is signed: the sign selects the direction of travel along the axis. Note that direction names the propagation axis while component names the displaced component — for a shear wave travelling along x and displacing z, use direction: x with component: z.

Application order

Conditions are applied in a fixed order:

  1. displacement entries
  2. velocity entries
  3. traveling wave entries
  4. initial acceleration solve
  5. Dirichlet values propagated into the state

Traveling-wave conditions come after the plain lists deliberately, so that the derived velocity field overrides any zero-velocity default the earlier lists left in place. If a node appears in both a velocity entry and a traveling wave entry, the traveling wave wins.

At step 4 Carina solves for the initial acceleration. When the residual is already negligible it reports:

[SETUP]   Initial Acceleration = 0 (trivial RHS, ...)

which is informational, not an error.