flow360.component.simulation.outputs.render_config.FieldMaterial#

class FieldMaterial[source]#

Bases: MaterialBase

FieldMaterial maps scalar field values to colors for flow visualization.

Example

>>> FieldMaterial.rainbow(field="pressure", min_value=0, max_value=100000)
type_name: Literal['FieldMaterial'] = 'FieldMaterial'#
opacity: float = 1#

The transparency of the material 1 is fully opaque, 0 is fully transparent

Constraints:
  • ge = 0

  • le = 1

output_field: Literal['Cp', 'Cpt', 'gradW', 'kOmega', 'Mach', 'mut', 'mutRatio', 'nuHat', 'primitiveVars', 'qcriterion', 'residualNavierStokes', 'residualTransition', 'residualTurbulence', 's', 'solutionNavierStokes', 'solutionTransition', 'solutionTurbulence', 'T', 'velocity', 'velocity_x', 'velocity_y', 'velocity_z', 'velocity_magnitude', 'pressure', 'vorticity', 'vorticityMagnitude', 'vorticity_x', 'vorticity_y', 'vorticity_z', 'wallDistance', 'numericalDissipationFactor', 'residualHeatSolver', 'VelocityRelative', 'lowMachPreconditionerSensor', 'velocity_m_per_s', 'velocity_x_m_per_s', 'velocity_y_m_per_s', 'velocity_z_m_per_s', 'velocity_magnitude_m_per_s', 'pressure_pa'] | str | UserVariable [Required]#

Scalar field applied to the surface via the colormap

min: _serializer, return_type=PydanticUndefined, when_used=always)] [Required]#

Reference min value (in solver units) representing the left boundary of the colormap

Constraints:
  • func = <function ValueOrExpression.__class_getitem__.<locals>._serializer at 0x70e5a9059cf0>

  • json_schema_input_type = PydanticUndefined

  • return_type = PydanticUndefined

  • when_used = always

max: _serializer, return_type=PydanticUndefined, when_used=always)] [Required]#

Reference max value (in solver units) representing the right boundary of the colormap

Constraints:
  • func = <function ValueOrExpression.__class_getitem__.<locals>._serializer at 0x70e5a9059ea0>

  • json_schema_input_type = PydanticUndefined

  • return_type = PydanticUndefined

  • when_used = always

colormap: List[Tuple[Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=255)])], Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=255)])], Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Ge(ge=0), Le(le=255)])]]] [Required]#

List of key colors distributed evenly across the gradient, defines value to color mappings

classmethod rainbow(field, min_value, max_value, opacity=1)[source]#

Create a rainbow-style colormap for scalar fields.

Example

>>> FieldMaterial.rainbow("velocity_magnitude")
classmethod orizon(field, min_value, max_value, opacity=1)[source]#

Create an Orizon-style (blue–orange) colormap.

Example

>>> FieldMaterial.orizon("temperature")
classmethod viridis(field, min_value, max_value, opacity=1)[source]#

Create a Viridis colormap.

Example

>>> FieldMaterial.viridis("vorticity")
classmethod magma(field, min_value, max_value, opacity=1)[source]#

Create a Magma colormap.

Example

>>> FieldMaterial.magma("density")
classmethod airflow(field, min_value, max_value, opacity=1)[source]#

Create an Airflow-style visualization colormap.

Example

>>> FieldMaterial.airflow("pressure_coefficient")