Inflow#

class Inflow[source]#

Bases: BoundaryBaseWithTurbulenceQuantities

Inflow defines the inflow boundary condition based on the input spec.

Example

  • Define inflow boundary condition with pressure:

    >>> fl.Inflow(
    ...     entities=[geometry["inflow"]],
    ...     total_temperature=300 * fl.u.K,
    ...     spec=fl.TotalPressure(
    ...         value = 1.028e6 * fl.u.Pa,
    ...     ),
    ...     velocity_direction = (1, 0, 0),
    ... )
    
  • Define inflow boundary condition with mass flow rate:

    >>> fl.Inflow(
    ...     entities=[volume_mesh["fluid/inflow"]],
    ...     total_temperature=300 * fl.u.K,
    ...     spec=fl.MassFlowRate(
    ...         value = 123 * fl.u.lb / fl.u.s,
    ...         ramp_steps = 10,
    ...     ),
    ...     velocity_direction = (1, 0, 0),
    ... )
    
  • Define inflow boundary condition with turbulence quantities:

    >>> fl.Inflow(
    ...     entities=[volume_mesh["fluid/inflow"]],
    ...     turbulence_quantities=fl.TurbulenceQuantities(
    ...         turbulent_kinetic_energy=2.312e-3 * fl.u.m **2 / fl.u.s**2,
    ...         specific_dissipation_rate= 1020 / fl.u.s,
    ...     )
    ... )
    
  • Define inflow boundary condition with expressions for spatially varying total temperature and total pressure:

    >>> fl.Inflow(
    ...     entities=[volumeMesh["fluid/inflow"]],
    ...     total_temperature="1.0+0.2*pow(0.1*(1.0-y*y),2.0)",
    ...     velocity_direction=(1.0, 0.0, 0.0),
    ...     spec=fl.TotalPressure(
    ...         value="pow(1.0+0.2*pow(0.1*(1.0-y*y),2.0),1.4/0.4)",
    ...     ),
    ... )
    

Attributes

entities: EntityList[Surface, MirroredSurface, WindTunnelGhostSurface]#

List of boundaries with the Inflow boundary condition imposed.

turbulence_quantities: TurbulentViscosityRatio | TurbulentKineticEnergy | TurbulentIntensity | TurbulentLengthScale | ModifiedTurbulentViscosityRatio | ModifiedTurbulentViscosity | SpecificDissipationRateAndTurbulentKineticEnergy | TurbulentViscosityRatioAndTurbulentKineticEnergy | TurbulentLengthScaleAndTurbulentKineticEnergy | TurbulentIntensityAndSpecificDissipationRate | TurbulentIntensityAndTurbulentViscosityRatio | TurbulentIntensityAndTurbulentLengthScale | SpecificDissipationRateAndTurbulentViscosityRatio | SpecificDissipationRateAndTurbulentLengthScale | TurbulentViscosityRatioAndTurbulentLengthScale, optional#

The turbulence related quantities definition.See TurbulenceQuantities() documentation.

Default:

None

name: str, optional#

Name of the Inflow boundary condition.

Default:

'Inflow'

total_temperature: str | AbsoluteTemperatureType#

Specify the total temperature at the Inflow boundary. When a string expression is supplied the value needs to nondimensionalized by the temperature defined in operating_condition.

spec: TotalPressure | MassFlowRate | Supersonic#

Specify additional conditions at the Inflow boundary.

velocity_direction: Axis, optional#

Direction of the incoming flow. Must be a unit vector pointing into the volume. If unspecified, the direction will be normal to the surface.

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