Skip to content

Properties, presets and models

Properties define semantic state.

property Thermal {
temperature: Float<0.25> [0.0 1.0] ~1e-4;
conductivity: Float [0.0 1.0] ~1e-4;
heat_capacity: Float [0.0 10.0] ~1e-4;
}

Field syntax:

name: Type<optional_default> optional_bounds ~optional_precision;

The type is mandatory. Default value, bounds, and the ~epsilon annotation are optional. The annotation describes requested precision for compilation; it does not choose the execution backend. Studio’s solver profile selects 32-bit or 64-bit Float execution for the run.

A field with <value> has a default:

temperature: Float<0.25>;

A field without <value> must be initialized by a preset or inline model block:

conductivity: Float;

Current scalar types:

Float
Int
Bool

Presets define reusable initial values for one property.

preset WaterThermal for Thermal {
conductivity<0.55>;
heat_capacity<4.20>;
}

Presets may initialize all fields or only some fields. Property defaults fill any defaulted fields that the preset does not mention.

Named presets are best for configurations that are useful across models or simulations. One-off model tuning should usually be written inline in the model.

Models are simulation-scoped cell definitions composed from properties.

model Water :
Liquid {WaterBody},
Thermal {WaterThermal},
MoistureCarrier {
moisture<1.0>;
},
LbmD3Q7;

Model entries may use a property as-is:

model Smoke :
HeatSource;

This is valid only when all fields of HeatSource have defaults.

A model may use a named preset:

model Fire :
Combustible {VolatileFuel};

A model may use an inline anonymous preset:

model Grass :
MoistureCarrier {
moisture<0.65>;
};

Inline preset blocks are local to that model and are not importable as public presets.

A published model can include its behavior schedule, visual binding and required context as well as fields and defaults. Importing that model keeps those pieces together. A preset changes starting values; it does not define the world, create initial cells or schedule a behavior.

Hyle Astro