5. API Reference

5.1. Installing Flow360 Client

The Flow360 client can be installed (and updated) from PyPI. Make sure you have the Python setuptools. If not, sudo apt-get install python3-setuptools.

pip3 install flow360client
pip3 install --upgrade flow360client

5.2. Sign in with you Account and Password

An account can be created at https://client.flexcompute.com/app/signup.

python3
>>> import flow360client
enter your email registered at flexcompute:********@gmail.com
Password: ***********
Do you want to keep logged in on this machine ([Y]es / [N]o)Y

Once you have installed the Flow360 client and signed into it, you can run your first case using the ONERA M6 Wing tutorial in the Quick Start section of this document.

5.3. Configuration Parameters

The current Mesh processor and Solver input configuration parameters for Flow360 are:

5.3.1. Flow360Mesh.json

Type

Options

Default

Description

boundaries

noSlipWalls

[]

list of names of boundary patches, e.g. [2,3,7] (for .ugrid), [“blk-1/wall1”,”blk-2/wall2”] (for .cgns)

slidingInterfaces

[]

list of pairs of sliding interfaces

stationaryPatches

[]

list of names of stationary boundary patches, e.g. [“stationaryField/interface”]

rotatingPatches

[]

list of names of dynamic boundary patches, e.g. [“rotatingField/interface”]

axisOfRotation

[]

axis of rotation, e.g. [0,0,-1]

centerOfRotation

[]

center of rotation, e.g. [0,0,0]

5.3.2. Flow360.json

Some commonly used symbols in Flow360.json:

\(L_{gridUnit}\)

physical length represented by unit length in the given mesh file. For example, if the wing span is 60 meter in physical space and it is 30,000 in mesh file, so the the \(L_{gridUnit}\) of this mesh is 0.002 meter

\(C_\infty\)

speed of sound of freestream

\(\rho_\infty\)

density of freestream

\(\mu_\infty\)

dynamic viscosity of freestream

\(p_\infty\)

static pressure of freestream

\(U_\text{ref}\)

reference velocity

5.3.2.1. geometry

Options

Default

Description

refArea

1

The reference area of the geometry

momentCenter

[0.0, 0.0, 0.0]

The x, y, z moment center of the geometry in grid units

momentLength

[1.0, 1.0, 1.0]

The x, y, z moment reference lengths

5.3.2.2. runControl

Options

Default

Description

restart

FALSE

the solutions are initialized from restarting files or not (no need to set by users)

startAlphaControlPseudoStep

-1

pseudo step at which to start targetCL control. -1 is no trim control. (steady only)

targetCL

-1

The desired trim CL to achieve (assocated with startAlphaControlPseudoStep)

5.3.2.3. freestream

Options

Default

Description

Reynolds

Not required if muRef exists

Reynolds number based on grid unit, = \(\frac{\rho_\infty U_\infty L_{gridUnit}}{\mu_\infty}\) i.e. If your grid is in millimeters, then it is the Reynolds number per millimeter of length. If your grid is in feet, it is the Reynolds number per foot of length

muRef

Not required if Reynolds exists

The refererence dynamic viscosity (non-dimenstional) in our solver, = \(\frac{\mu_\infty}{\rho_\infty C_\infty L_{gridUnit}}\)

Mach

REQUIRED

The Mach number, the ratio of freestream speed to the speed of sound.

MachRef

Required if Mach == 0

The reference Mach number to compute the mu, CL/CD, coefficients, etc…, = \(U_{ref}/C_\infty\). Its default value is “freestream/Mach”

Temperature

REQUIRED

The reference temperature in Kelvin. -1 means globally constant viscosity

alphaAngle

REQUIRED

The angle of attack in degrees

betaAngle

REQUIRED

The side slip angle in degrees

turbulentViscosity

1.0

The multiplicative factor for the freestream turbulent viscosity for the turbulence model

turbulenceIntensity

0.0

The turbulence intensity in the freestream in percent. If greater than zero, activates the transition model. A value of 0.5 in this field means turbulenceIntensity=0.5 %.

5.3.2.4. boundaries

Type

Format

Description

SlipWall

"boundary_name" :
{
 "type" : "SlipWall"
}

Slip wall condition. Also used for symmetry.

NoSlipWall

"boundary_name" :
{
 "type" : "NoSlipWall",
 "Velocity": [
  float or "expression" (default: 0),
  float or "expression" (default: 0),
  float or "expression" (default: 0)]
}

Sets no-slip wall condition. Optionally, a tangential velocity can be prescribed on the wall using the keyword “Velocity”.

IsothermalWall

"boundary_name" :
{
 "type" : "IsothermalWall",
 "Temperature":
  float or "expression" (REQUIRED),
 "Velocity": [
  float or "expression" (default: 0),
  float or "expression" (default: 0),
  float or "expression" (default: 0)]
}

Isothermal wall boundary condition. “Temperature” is specified in Kelvin. Optionally a tangential velocity can be presribed on the wall using the keyword “Velocity”.

Freestream

"boundary_name" :
{
 "type" : "Freestream",
 "Velocity": [
  float or "expression" (default: freestream),
  float or "expression" (default: freestream),
  float or "expression" (default: freestream)]
}

External freestream condition. Optionally, an expression for each of the velocity components can be specified using the keyword “Velocity”.

SubsonicOutflowPressure

"boundary_name" :
{
 "type" : "SubsonicOutflowPressure",
 "staticPressureRatio" : float
}

Subsonic outflow, enforced through static pressure ratio.

SubsonicOutflowMach

"boundary_name" :
{
 "type" : "SubsonicOutflowMach",
 "MachNumber" : float
}

Static pressure outflow boundary condition set via a specified subsonic Mach number.

SubsonicInflow

"boundary_name" :
{
 "type" : "SubsonicInflow",
 "totalPressureRatio" : float,
 "totalTemperatureRatio" : float,
 "rampSteps" : Integer
}

Subsonic inflow (enforced via total pressure ratio and total temperature ratio) for nozzle or tunnel plenum.

MassOutflow

"boundary_name" :
{
 "type" : "MassOutflow",
 "massFlowRate" : float
}

Specification of massflow out of the control volume.

MassInflow

"boundary_name" :
{
 "type" : "MassInflow",
 "massFlowRate" : float
}

Specification of massflow into the control volume.

Note: “expression” is an expression with “x”, “y”, “z” as independent variables.

5.3.2.5. volumeOutput

Options

Default

Description

outputFormat

paraview

“paraview” or “tecplot”

animationFrequency

-1

Frequency at which volume output is saved. -1 is at end of simulation

startAverageIntegrationStep

0

Sub-iteration or time-step to start averaging forces/moments

computeTimeAverages

FALSE

Whether or not to compute time-averaged quantities

primitiveVars

TRUE

Outputs rho, u, v, w, p

vorticity

FALSE

Vorticity

residualNavierStokes

FALSE

5 components of the N-S residual

residualTurbulence

FALSE

Residual for the turbulence model

residualTransition

FALSE

Residual for the transition model

solutionTurbulence

FALSE

Solution for the turbulence model

solutionTransition

FALSE

Solution for the transition model

T

FALSE

Temperature

s

FALSE

Entropy

Cp

TRUE

Coefficient of pressure. \(C_p=(\frac{p-p_\infty}{\frac{1}{2}\rho_\infty{U_{ref}}^2})\).

mut

TRUE

Turbulent viscosity

nuHat

TRUE

nuHat

kOmega

FALSE

k and omega when using kOmegaSST model

mutRatio

FALSE

\(\mu_t/{\mu_\infty}\)

Mach

TRUE

Mach number

VelocityRelative

FALSE

velocity in rotating frame

qcriterion

FALSE

Q criterion

gradW

FALSE

Gradient of W

5.3.2.6. surfaceOutput

Options

Default

Description

outputFormat

paraview

“paraview” or “tecplot”

animationFrequency

-1

Frequency at which surface output is saved. -1 is at end of simulation

primitiveVars

FALSE

rho, u, v, w, p

Cp

FALSE

Coefficient of pressure

Cf

FALSE

Skin friction coefficient

heatFlux

FALSE

Heat Flux

CfVec

FALSE

Viscous stress coefficient vector. For example, \(C_{f_{Vec}}[3]=\frac{\tau_{wall}[3]}{\frac{1}{2}\rho_\infty U_{ref}^2}\). The \(\tau_{wall}\) is the vector of viscous stress on the wall.

yPlus

FALSE

y+

wallDistance

FALSE

Wall Distance

Mach

FALSE

Mach number

nodeForcesPerUnitArea

FALSE

\(nodeForcesPerUnitArea=\frac{\tau_{wall}[3]-(p-p_\infty)*normal[3]} {\rho_\infty C_\infty^2}\), where the \(normal[3]\) is the unit normal vector pointing from solid to fluid.

residualSA

FALSE

Spalart-Allmaras residual magnitude

5.3.2.7. sliceOutput

Options

Default

Description

outputFormat

paraview

“paraview” or “tecplot”

animationFrequency

-1

Frequency at which slice output is saved. -1 is at end of simulation

primitiveVars

TRUE

Outputs rho, u, v, w, p

vorticity

FALSE

Vorticity

T

FALSE

Temperature

s

FALSE

Entropy

Cp

FALSE

Coefficient of pressure

mut

FALSE

Turbulent viscosity

mutRatio

FALSE

\(mut/mu_\infty\)

Mach

TRUE

Mach number

gradW

FALSE

gradient of W

slices

[]

List of slices to save after the solver has finished

sliceName

string

sliceNormal

[x, y, z]

sliceOrigin

[x, y, z]

5.3.2.9. turbulenceModelSolver

Options

Default

Description

modelType

SpalartAllmaras

Turbulence model type can be: “SpalartAllmaras” or “kOmegaSST”

absoluteTolerance

1.00E-08

Tolerance for the turbulence model residual, below which the solver goes to the next physical step

relativeTolerance

1.00E-02

Tolerance to the ratio of residual of current pseudoStep to the initial residual, below which the solver goes to the next physical step

linearIterations

20

Number of linear iterations for the turbulence moddel linear system

updateJacobianFrequency

4

Frequency at which to update the Jacobian

equationEvalFrequency

4

Frequency at which to evaluate the turbulence equation in loosely-coupled simulations

kappaMUSCL

-1

Kappa for the muscle scheme, range from [-1, 1] with 1 being unstable.

rotationCorrection

FALSE

Rotation correction for the turbulence model. Only support for SpalartAllmaras

orderOfAccuracy

2

Order of accuracy in space

maxForceJacUpdatePhysicalSteps

0

When which physical steps, the jacobian matrix is updated every pseudo step

DDES

FALSE

_true_ enables Delayed Detached Eddy Simulation. Only supported for SpalartAllmaras model

5.3.2.10. transitionModelSolver

Options

Default

Description

modelType

AmplificationFactorTransport

Transition model type can be: “AmplificationFactorTransport”

absoluteTolerance

1.00E-07

Tolerance for the transition model residual, below which the solver goes to the next physical step

relativeTolerance

1.00E-02

Tolerance to the ratio of residual of current pseudoStep to the initial residual

linearIterations

20

Number of linear iterations for the transition model linear system

updateJacobianFrequency

4

Frequency at which to update the Jacobian

equationEvalFrequency

4

Frequency at which to evaluate the turbulence equation in loosely-coupled simulations

orderOfAccuracy

2

Order of accuracy in space

maxForceJacUpdatePhysicalSteps

0

When which physical steps, the jacobian matrix is updated every pseudo step

5.3.2.11. initialCondition

Options

Default

Description

type

“freestream”

Use the flow conditions defined in freestream section to set initial condition. Could be “freestream” or an “expression”

5.3.2.12. timeStepping

Options

Default

Description

maxPhysicalSteps

1

Maximum physical steps

timeStepSize

“inf”

Nondimensional time step size in physical step marching, it is calculated as \(\frac{\Delta t_{physical} C_\infty} {L_{gridUnit}}\). \(\Delta t_{physical}\) is the physical time step size. “inf” means steady solver.

maxPseudoSteps

2000

Maximum pseudo steps within one physical step

CFL->initial

5

Initial CFL for solving pseudo time step

CFL->final

200

Final CFL for solving pseudo time step

CFL->rampSteps

40

Number of steps before reaching the final CFL within 1 physical step

5.3.2.13. slidingInterfaces (list)

Options

Default

Description

stationaryPatches

Empty

a list of static patch names of an interface

rotatingPatches

Empty

a list of dynamic patch names of an interface

thetaRadians

Empty

expression for rotation angle (in radians) as a function of time

thetaDegrees

Empty

expression for rotation angle (in degrees) as a function of time

omegaRadians

Empty

non-dimensional rotating speed, radians/nondim-unit-time, = \(\Omega*L_{gridUnit}/C_\infty\), where the SI unit of \(\Omega\) is rad/s.

omegaDegrees

Empty

non-dimensional rotating speed, degrees/nondim-unit-time, = \(\text{omegaRadians}*180/PI\)

centerOfRotation

Empty

a 3D array, representing the origin of rotation, e.g. [0,0,0]

axisOfRotation

Empty

a 3D array, representing the rotation axis, e.g. [0,0,1]

volumeName

Empty

a list of dynamic volume names related to the above {omega, centerOfRotation, axisOfRotation}

5.3.2.14. actuatorDisks (list)

Options

Default

Description

center

Empty

center of the actuator disk

axisThrust

Empty

direction of the thrust, it is an unit vector

thickness

Empty

thickness of the actuator disk

forcePerArea->radius (list)

Empty

radius of the sampled locations in grid unit

forcePerArea->thrust (list)

Empty

force per area along the axisThrust, positive means the axial force follows the same direction of “axisThrust”. It is non-dimensional, = \(\frac{\text{thrustPerArea}(SI=N/m^2)}{\rho_\infty C^2_\infty}\)

forcePerArea->circumferential (list)

Empty

force per area in circumferential direction, positive means the circumferential force follows the same direction of “axisThrust” based on right hand rule. It is non-dimensional,= \(\frac{\text{circumferentialForcePerArea}(SI=N/m^2)}{\rho_\infty C^2_\infty}\)

5.3.2.15. BETDisks (list)

Option

Default

Description

centerOfRotation

Empty

[3-array] center of the Blade Element Theory (BET) disk

axisOfRotation

Empty

[3-array] rotational axis of the BET disk

numberOfBlades

Empty

[int] number of blades to model

radius

Empty

[float] radius of the blades

omega

Empty

[float] non-dimensional rotating speed, radians/nondim-unit-time, = \(\Omega*L_{gridUnit}/C_\infty\), where the SI unit of \(\Omega\) is rad/s.

chordRef

Empty

[float] reference chord used to compute blade loadings.

nLoadingNodes

Empty

[float] Number of nodes used to compute the radial \(C_T\) and \(C_Q\) loadings. Recomended value is 20.

thickness

Empty

[float] thickness of the BET disk. Should be less than the thickness of the refined region of the disk mesh.

bladeLineChord

0.0

[float] chord to use if performing an unsteady blade-line (as opposed to steady blade-disk) simulation. Recomended value is 1-2x the physical mean aerodynamic chord (MAC) of the blade for blade line analysis. Default of 0.0 indicates to run blade-disk analysis instead of blade-line.

initialBladeDirection

Empty

[3-array]. Orientation of the first blade in the blade-line model. Must be specified if performing blade-line analysis.

twists

Empty

[list(dict)] A list of dictionary entries specifying the twist in degrees as a function of radial location. Entries in the list must already be sorted by radius. Example entry in the list would be {“radius” : 5.2, “twist” : 32.5}.

chords

Empty

[list(dict)] A list of dictionary entries specifying the blade chord as a function of the radial location. Entries in the list must already be sorted by radius. Example entry in the list would be {“radius” : 5.2, “chord” : 12.0}.

sectionalPolars

Empty

[list(dict)] A list of dictionaries for every radial location specified in sectionalRadiuses. Each dict has two entries, “liftCoeffs” and “dragCoeffs”, both of which have the same data storage format: 3D arrays (implemented as nested lists). The first index of the array corresponds to the MachNumbers of the specified polar data. The second index of the array corresponds to the ReynoldsNumbers of the polar data. The third index corresponds to the alphas. The value specifies the lift or drag coefficient, respectively.

sectionalRadiuses

Empty

[list(float)] A list of the radial locations at which \(C_l\) and \(C_d\) are specified in sectionalPolars

alphas

Empty

[list(float)] alphas associated with airfoil polars provided in sectionalPolars in degrees.

MachNumbers

Empty

[list(float)] Mach numbers associated with airfoil polars provided in sectionalPolars.

ReynoldsNumbers

Empty

[list(float)] Reynolds numbers associated with the airfoil polars provided in sectionalPolars.