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


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

python3
>>> import flow360client
enter your email registered at flexcompute:********@gmail.com
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¶

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

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

Nondimensional Reynolds number. Reynolds number should be computed based on the reference length in grid units. For example, if you have a mesh with a MAC of 100 in grid units and want to simulate a physical Reynolds number of 1M, then you should set Reynolds = 100,000.

muRef

Not required if Reynolds exists

refererence mu(non-dimenstional) in our solver

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…

Temperature

REQUIRED

The reference temperature in Kelvin.

alphaAngle

REQUIRED

The angle of attack in degrees

betaAngle

REQUIRED

The side slip angle in degrees

5.3.2.4. boundaries¶

Options

Default

Description

YOUR_FIRST_BOUNDARY_ID: type

YOUR_BOUNDARY_TYPE

List of boundary conditions. The current supported boundaries are: SlipWall (used for symmetry), NoSlipWall, Freestream, SubsonicOutflowPressure, SubsonicOutflowMach, SubsonicInflow, MassOutflow, MassInflow.

YOUR_SECOND_BOUNDARY_ID: type

YOUR_BOUNDARY_TYPE

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

nuHat

T

FALSE

Temperature

s

FALSE

Entropy

Cp

TRUE

Coefficient of pressure. Cp = (p-p_inf)/(0.5*rho_inf*velocity_ref*velocity_ref). The p_inf the static pressure of freestream. The rho_inf and velocity_ref are the same as those in CfVec.

mut

TRUE

Turbulent viscosity

nuHat

TRUE

nuHat

mutRatio

FALSE

mut/mu_inf

Mach

TRUE

Mach number

VelocityRelative

FALSE

velocity in rotating frame

qcriterion

FALSE

Q criterion

FALSE

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

CfVec

FALSE

Viscous stress coefficient vector. For example, CfVec[3] = tau_wall[3]/(0.5*rho_inf*velocity_ref*velocity_ref). The tau_wall is the vector of viscous stress on the wall. The rho_inf is the density of freestream, velocity_ref is the C_inf*Mach_ref, where the C_inf is the speed of sound of freestream, and the “Mach_ref” is the value specified at the “freestream” section of Flow360.json. If the “Mach_ref” is not specified in the Flow360.json, its default value is equal to the “Mach” in “freestream” section of Flow360.json.

yPlus

FALSE

y+

wallDistance

FALSE

Wall Distance

Mach

FALSE

Mach number

nodeForcesPerUnitArea

FALSE

nodeForcesPerUnitArea = (tau_wall[3]-(p-p_inf)*normal[3])/(rho_inf*C_inf* C_inf), 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

residualNavierStokes

FALSE

Residual components for Navier-stokes equations

residualTurbulence

FALSE

Residual magnitude of turbulence equations

T

FALSE

Temperature

s

FALSE

Entropy

Cp

FALSE

Coefficient of pressure

mut

FALSE

Turbulent viscosity

mutRatio

FALSE

mut/mu_inf

Mach

TRUE

Mach number

FALSE

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

Only SA supported at this point

absoluteTolerance

1.00E-08

Tolerance for the SA 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 SA 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

SARC model

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 DDES simulation

5.3.2.10. 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.11. timeStepping¶

Options

Default

Description

maxPhysicalSteps

1

Maximum physical steps

timeStepSize

“inf”

Time step size in physical step marching, “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.12. 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

omega

Empty

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}