FLOOXS » TclLib » Models

Models — TclLib Procs

17 documented proc(s) in TclLib/Models/.

__cubic_stiffness · __pack_aniso_result · cij_atensor · cij_get · cij_stensor · init_adapt_fields · set_aniso_elastic · set_transverse_iso_elastic · stress_canonical_variants · stress_eq_aniso · stress_eq_aniso_2d · stress_eq_aniso_3d · stress_eq_iso_2d · stress_eq_iso_3d · stress_eq_transiso_3d · stress_known_bases · stress_resolve_base

__cubic_stiffness

file: TclLib/Models/Elastic.tcl

Cubic 6x6 stiffness matrix in crystal frame from C11, C12, C44.

__pack_aniso_result

file: TclLib/Models/Elastic.tcl

Pack a rotated 6x6 stiffness matrix + the three 2D-RHS compliance entries
into the 15-element list expected by cij_atensor / cij_stensor:
  c00 c01 c02 c10 c11 c12 c20 c21 c22 c33 c44 c55 s02 s12 s22
where c33/c44/c55 in the output correspond to C(5,5), C(3,3), C(4,4) — the
C++ stress.cc ordering (re-orders shears xy/yz/zx).

cij_atensor

file: TclLib/Models/Elastic.tcl

Full anisotropic ATensor: twelve independent constants from the rotated
6x6 stiffness matrix.

cij_get

file: TclLib/Models/Elastic.tcl

Look up the stiffness list for a material.  Tries (in order): literal
name, lowercased name, and then the `mater get.inherit` chain — so a
material declared `mater name=backsideSi add inherit=Silicon` picks up
Silicon's stiffness without an explicit duplicate registration.  Errors
loudly when nothing is found (silent zeros would mask a broken stress
solve).

cij_stensor

file: TclLib/Models/Elastic.tcl

Isotropic-by-symmetry STensor: three independent constants
c00 (longitudinal), c01 (off-diagonal), c22 (shear). Takes the full
15- or 12-element list returned by set_aniso_elastic; ignores all but
the relevant entries.

init_adapt_fields

file: TclLib/Models/AdaptFields.tcl

Substeps 3a + 3b fields.  Additional Grid.* fields are added by later
Phase-3 substeps (ShrinkEarly, ShrinkLate, GridAddPerp, Refine.Stop, ...).

perp.add.dist / Max.Radius / bound.add.dist / Corner.Add are only read by
the growing-mesh GridAdd path (LCOV_EXCL'd in coverage today, since the
active deposit goes through DepLvl which calls GridUpd(do_add=0)).
Defaults track the historical 0.1*UnitScl values; decks override with
`sel z=<expr>*Mater(SomeMat) ...` for per-material scoping.

set_aniso_elastic

file: TclLib/Models/Elastic.tcl

Rotated cubic stiffness for an arbitrary Miller orientation.

Usage:
  set cij [set_aniso_elastic C11=... C12=... C44=... Miller=(hkl)<uvw>]

Args:
  C11, C12, C44 — cubic stiffness constants in crystal frame (dynes/cm^2 or Pa)
  Miller        — orientation in (hkl)<uvw> notation; default (001)<100>

Returns a 15-element list (see __pack_aniso_result above) that the
cij_get/cij_atensor helpers consume.

set_transverse_iso_elastic

file: TclLib/Models/Elastic.tcl

Rotated transverse-isotropic stiffness from engineering constants.

Usage:
  set cij [set_transverse_iso_elastic E1=... E2=... v12=... v23=... G12=...]

Args:
  E1, E2 — Young's moduli (1 = out of plane, 2 = in plane)
  v12    — Poisson's ratio for stress-1 / strain-2 coupling
  v23    — Poisson's ratio within the isotropic plane
  G12    — Shear modulus in plane containing the 1-axis
  Miller — orientation (hkl)<uvw>; default (001)<100>

Returns a 12-element list (no 2D-RHS compliance terms — transverse-iso
decks don't use those entries):
  c00 c01 c02 c10 c11 c12 c20 c21 c22 c33 c44 c55

stress_canonical_variants

file: TclLib/Models/StressPackage.tcl

Declare common stress-deck variant materials with their canonical parents.
Idempotent.  Each variant's parent base is initialized first via its
`::ElasticInit` (which auto-declares its own parent recursively, ending
at BaseMat).

Call this BEFORE `init inf=...` if the loaded structure references the
variants — otherwise the structure-file load will register the variants
without inheritance, and StressPackage's dispatch loop can't resolve
them via `mater get.inherit`.

stress_eq_aniso

file: TclLib/Models/Elastic.tcl

Convenience dispatch.

stress_eq_aniso_2d

file: TclLib/Models/Elastic.tcl

2D anisotropic stress equation.  Uses the 5-entry ATensor( c00 c01 c10 c11
c33 ) form and the 2D-RHS compliance scaling (1 - s_iz/s_zz) on the
in-plane user strains.  Requires the full 15-element list (needs s02/s12/s22).

stress_eq_aniso_3d

file: TclLib/Models/Elastic.tcl

3D anisotropic stress equation.  Takes the 12- or 15-element list returned
by set_aniso_elastic / set_transverse_iso_elastic.

The strain term uses `ATensor(c00..c33,c33,c33)` (Tshear form) — the
alagator assembler expects the shear-block of the strain-coupling tensor
to have identical diagonal entries c33, not the full c33/c44/c55
Voigt-rotated values.  Matches the working pattern in the legacy
updatedstressprocs.source / anisoprocs.source.  An earlier "T for both"
form (used by Stress3DAniso in src/FLOOXS.models) produced an
`ElasticTerm::Assemble has a size mismatch` panic at solve time.

stress_eq_iso_2d

file: TclLib/Models/Elastic.tcl

2D isotropic stress equation with (1+ν) user-strain scaling and 2D stress
components only.

stress_eq_iso_3d

file: TclLib/Models/Elastic.tcl

3D isotropic stress equation from Young's modulus + Poisson ratio.

stress_eq_transiso_3d

file: TclLib/Models/Elastic.tcl

3D transverse-iso stress equation.  Uses the full ATensor (no c33-repeated
Tshear form) for the strain term — matches the legacy Stress3DTransIso in
the deleted FLOOXS.models block byte-for-byte.

stress_known_bases

file: TclLib/Models/StressPackage.tcl

Scan Tcl's auto_index for `::<Mat>::ElasticEqns` entries.

stress_resolve_base

file: TclLib/Models/StressPackage.tcl

Walk a material's inherit chain until we find a namespace with
`::ElasticEqns` defined or auto-loadable.  Returns the namespace name,
or "" if no match. Uses the `mater get.inherit` chain.