ForceOutput#

class ForceOutput[source]#

Bases: _OutputBase

ForceOutput class for setting total force output of specific surfaces.

Example

Define ForceOutput to output total CL and CD on multiple wing surfaces and a BET disk.

>>> wall = fl.Wall(name = 'wing', surfaces=[volume_mesh['1'], volume_mesh["wing2"]])
>>> bet_disk = fl.BETDisk(...)
>>> fl.ForceOutput(
...     name="force_output",
...     models=[wall, bet_disk],
...     output_fields=["CL", "CD"]
... )

Attributes

output_fields: UniqueItemList[Literal]#

List of force coefficients. Including CL, CD, CFx, CFy, CFz, CMx, CMy, CMz. For surface forces, their SkinFriction/Pressure is also supported, such as CLSkinFriction and CLPressure.

name: str#

Name of the force output.

Default:

'Force output'

models: list[Wall | BETDisk | ActuatorDisk | PorousMedium | str]#

List of surface/volume models (or model ids) whose force contribution will be calculated.

moving_statistic: MovingStatistic, optional#

When specified, report moving statistics of the fields instead.

Default:

None

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')