RenderOutputGroup#

class RenderOutputGroup[source]#

Bases: Flow360BaseModel

RenderOutputGroup for defining a render output group - i.e. a set of entities sharing a common material (display options) settings.

Example

Define two RenderOutputGroup objects, one assigning all boundaries of the uploaded geometry to a flat metallic material, and another assigning a slice and an isosurface to a material which will display a scalar field on the surface of the entity.

>>> fl.RenderOutputGroup(
...     surfaces=geometry["*"],
...     material=fl.PBRMaterial.metal(shine=0.8)
... ),
... fl.RenderOutputGroup(
...     slices=[
...         fl.Slice(name="Example slice", normal=(0, 1, 0), origin=(0, 0, 0))
...     ],
...     isosurfaces=[
...         fl.Isosurface(name="Example isosurface", iso_value=0.1, field="T")
...     ],
...     material=fl.FieldMaterial.rainbow(field="T", min_value=0, max_value=1, alpha=0.4)
... )
====

Attributes

surfaces: EntityList[Surface, MirroredSurface], optional#

List of of Surface entities.

Default:

None

slices: EntityList[Slice], optional#

List of of Slice entities.

Default:

None

isosurfaces: UniqueItemList[Isosurface], optional#

List of Isosurface entities.

Default:

None

material: PBRMaterial | FieldMaterial#

Materials settings (color, surface field, roughness etc..) to be applied to the entire group

Additional Constructors

classmethod from_file(filename)#

Loads a Flow360BaseModel from .json, or .yaml file.

Parameters:

filename (str) – Full path to the .yaml or .json file to load the Flow360BaseModel from.

Returns:

An instance of the component class calling load.

Return type:

Flow360BaseModel

Example

>>> params = Flow360BaseModel.from_file(filename='folder/sim.json') 

Methods

help(methods=False)#

Prints message describing the fields and methods of a Flow360BaseModel.

Parameters:

methods (bool = False) – Whether to also print out information about object’s methods.

Return type:

None

Example

>>> params.help(methods=True) 
to_file(filename, **kwargs)#

Exports Flow360BaseModel instance to .json or .yaml file

Parameters:

filename (str) – Full path to the .json or .yaml or file to save the Flow360BaseModel to.

Return type:

None

Example

>>> params.to_file(filename='folder/flow360.json')