SS.CFD 1.3.0
Structured and triangular unstructured 2D finite-volume geometry; Navier-Stokes and conservative Euler evolution; residual/conservation audits; joint transport stability; typed fields and boundary contracts
Language compatibility: >=1.0.0 <2.0.0
Runtime compatibility: >=1.0.0 <2.0.0
Dependencies: SS.Discretization ^1.2.0
Public API
CFD.advancePeriodic
export function advancePeriodic(double[] initial, velocity advectionVelocity, diffusivity diffusion, m cellSize, s timeStep, int steps) -> FiniteVolumeResultParameters: initial: double[], advectionVelocity: velocity, diffusion: diffusivity, cellSize: m, timeStep: s, steps: int
CFD.boundaryCondition2D
export function boundaryCondition2D(string boundary, string kind, double scalarValue, double xValue, double yValue)->BoundaryCondition2DParameters: boundary: string, kind: string, scalarValue: double, xValue: double, yValue: double
CFD.BoundaryCondition2D
export record BoundaryCondition2D(public string boundary, public string kind, public double scalarValue, public double xValue, public double yValue)Parameters: boundary: string, kind: string, scalarValue: double, xValue: double, yValue: double
CFD.cellCenterX
export function cellCenterX(StructuredGrid2D grid, int column)->mParameters: grid: StructuredGrid2D, column: int
CFD.cellCenterY
export function cellCenterY(StructuredGrid2D grid, int row)->mParameters: grid: StructuredGrid2D, row: int
CFD.cfdResidualAndConservation
export function cfdResidualAndConservation(EulerSystem2DResult result, double gamma, double tolerance)->CFDResidualConservationResultParameters: result: EulerSystem2DResult, gamma: double, tolerance: double
export record CFDResidualConservationResult(public double massResidual, public double momentumXResidual, public double momentumYResidual, public double energyResidual, public double maximumStepResidual, public double minimumDensity, public double minimumPressure, public bool positive, public bool conserved, public string diagnostic)Parameters: massResidual: double, momentumXResidual: double, momentumYResidual: double, energyResidual: double, maximumStepResidual: double, minimumDensity: double, minimumPressure: double, positive: bool, conserved: bool, diagnostic: string
CFD.combinedTransportStability
export function combinedTransportStability(velocity velocityX, velocity velocityY, diffusivity diffusion, m spacingX, m spacingY, s proposedTimeStep, string scheme)->CombinedTransportStabilityResultParameters: velocityX: velocity, velocityY: velocity, diffusion: diffusivity, spacingX: m, spacingY: m, proposedTimeStep: s, scheme: string
export record CombinedTransportStabilityResult(public double courantX, public double courantY, public double diffusionX, public double diffusionY, public double combinedNumber, public double maximumStableTimeStep, public bool stable, public string scheme)Parameters: courantX: double, courantY: double, diffusionX: double, diffusionY: double, combinedNumber: double, maximumStableTimeStep: double, stable: bool, scheme: string
CFD.compare
export function compare(double[] computed, double[] reference) -> ErrorEstimateParameters: computed: double[], reference: double[]
CFD.courantNumber
export function courantNumber(velocity speed, s timeStep, m cellSize) -> doubleParameters: speed: velocity, timeStep: s, cellSize: m
CFD.EulerInterfaceFlux2D
export record EulerInterfaceFlux2D(public double mass, public double momentumX, public double momentumY, public double energy, public double maximumWaveSpeed)Parameters: mass: double, momentumX: double, momentumY: double, energy: double, maximumWaveSpeed: double
CFD.eulerPressure2D
export function eulerPressure2D(EulerState2D state, double gamma)->doubleParameters: state: EulerState2D, gamma: double
CFD.eulerState2D
export function eulerState2D(double density, double velocityX, double velocityY, double pressure, double gamma)->EulerState2DParameters: density: double, velocityX: double, velocityY: double, pressure: double, gamma: double
CFD.EulerState2D
export record EulerState2D(public double density, public double momentumX, public double momentumY, public double totalEnergy)Parameters: density: double, momentumX: double, momentumY: double, totalEnergy: double
CFD.EulerSystem2DResult
export record EulerSystem2DResult(public EulerState2D[] states, public double[] residualHistory, public double initialMass, public double finalMass, public double initialMomentumX, public double finalMomentumX, public double initialMomentumY, public double finalMomentumY, public double initialEnergy, public double finalEnergy, public int steps, public bool positive, public bool converged, public string diagnostic)Parameters: states: EulerState2D[], residualHistory: double[], initialMass: double, finalMass: double, initialMomentumX: double, finalMomentumX: double, initialMomentumY: double, finalMomentumY: double, initialEnergy: double, finalEnergy: double, steps: int, positive: bool, converged: bool, diagnostic: string
CFD.FiniteVolumeResult
export record FiniteVolumeResult(public double[] values, public double initialIntegral, public double finalIntegral, public double relativeConservationError, public double courantNumber, public double diffusionNumber, public int steps)Parameters: values: double[], initialIntegral: double, finalIntegral: double, relativeConservationError: double, courantNumber: double, diffusionNumber: double, steps: int
export record Incompressible2DResult(public VectorField2D velocity, public ScalarField2D pressure, public double[] residualHistory, public double divergenceL2, public double momentumImbalance, public int iterations, public bool converged, public string status)Parameters: velocity: VectorField2D, pressure: ScalarField2D, residualHistory: double[], divergenceL2: double, momentumImbalance: double, iterations: int, converged: bool, status: string
export record LidDrivenCavity2DResult(public VectorField2D velocity, public ScalarField2D streamfunction, public ScalarField2D vorticity, public double[] residualHistory, public double divergenceL2, public double kineticEnergy, public int iterations, public bool converged, public string status)Parameters: velocity: VectorField2D, streamfunction: ScalarField2D, vorticity: ScalarField2D, residualHistory: double[], divergenceL2: double, kineticEnergy: double, iterations: int, converged: bool, status: string
CFD.rusanovEulerFlux2D
export function rusanovEulerFlux2D(EulerState2D left, EulerState2D right, double gamma, string normal)->EulerInterfaceFlux2DParameters: left: EulerState2D, right: EulerState2D, gamma: double, normal: string
CFD.scalarField2D
export function scalarField2D(StructuredGrid2D grid, double[] values, string unitSymbol)->ScalarField2DParameters: grid: StructuredGrid2D, values: double[], unitSymbol: string
CFD.ScalarField2D
export record ScalarField2D(public double[] values, public int cellsX, public int cellsY, public string unitSymbol)Parameters: values: double[], cellsX: int, cellsY: int, unitSymbol: string
export record ScalarTransport2DResult(public ScalarField2D field, public double initialIntegral, public double finalIntegral, public double relativeConservationError, public double courantX, public double courantY, public double diffusionX, public double diffusionY, public double[] residualHistory, public int steps, public bool converged, public string status)Parameters: field: ScalarField2D, initialIntegral: double, finalIntegral: double, relativeConservationError: double, courantX: double, courantY: double, diffusionX: double, diffusionY: double, residualHistory: double[], steps: int, converged: bool, status: string
CFD.solveEulerSystem2D
export function solveEulerSystem2D(StructuredGrid2D grid, EulerState2D[] initial, double gamma, s timeStep, int steps)->EulerSystem2DResultParameters: grid: StructuredGrid2D, initial: EulerState2D[], gamma: double, timeStep: s, steps: int
CFD.solveIncompressible2D
export function solveIncompressible2D(StructuredGrid2D grid, VectorField2D initialVelocity, ScalarField2D initialPressure, double density, double dynamicViscosity, double pressureGradientX, double pressureGradientY, string mode, s timeStep, int maximumIterations, int pressureIterations, double tolerance, BoundaryCondition2D[] boundaries)->Incompressible2DResultParameters: grid: StructuredGrid2D, initialVelocity: VectorField2D, initialPressure: ScalarField2D, density: double, dynamicViscosity: double, pressureGradientX: double, pressureGradientY: double, mode: string, timeStep: s, maximumIterations: int, pressureIterations: int, tolerance: double, boundaries: BoundaryCondition2D[]
CFD.solveLidDrivenCavity2D
export function solveLidDrivenCavity2D(StructuredGrid2D grid, velocity lidVelocity, double reynoldsNumber, int maximumIterations, double tolerance)->LidDrivenCavity2DResultParameters: grid: StructuredGrid2D, lidVelocity: velocity, reynoldsNumber: double, maximumIterations: int, tolerance: double
CFD.solveScalarTransport2D
export function solveScalarTransport2D(StructuredGrid2D grid, ScalarField2D initial, velocity velocityX, velocity velocityY, diffusivity diffusion, s timeStep, string mode, int limit, double tolerance, BoundaryCondition2D[] boundaries)->ScalarTransport2DResultParameters: grid: StructuredGrid2D, initial: ScalarField2D, velocityX: velocity, velocityY: velocity, diffusion: diffusivity, timeStep: s, mode: string, limit: int, tolerance: double, boundaries: BoundaryCondition2D[]
CFD.structuredGrid2D
export function structuredGrid2D(m width, m height, int cellsX, int cellsY, string leftBoundary, string rightBoundary, string bottomBoundary, string topBoundary)->StructuredGrid2DParameters: width: m, height: m, cellsX: int, cellsY: int, leftBoundary: string, rightBoundary: string, bottomBoundary: string, topBoundary: string
CFD.StructuredGrid2D
export record StructuredGrid2D(public m width, public m height, public int cellsX, public int cellsY, public m dx, public m dy, public string leftBoundary, public string rightBoundary, public string bottomBoundary, public string topBoundary)Parameters: width: m, height: m, cellsX: int, cellsY: int, dx: m, dy: m, leftBoundary: string, rightBoundary: string, bottomBoundary: string, topBoundary: string
export function unstructuredFiniteVolumeMesh2D(double[] x, double[] y, int[] triangleNodes, int[] localBoundaryIds)->UnstructuredFiniteVolumeMesh2DResultParameters: x: double[], y: double[], triangleNodes: int[], localBoundaryIds: int[]
export record UnstructuredFiniteVolumeMesh2DResult(public double[] nodeX, public double[] nodeY, public int[] cellNodes, public double[] cellAreas, public double[] cellCenterX, public double[] cellCenterY, public int[] faceOwner, public int[] faceNeighbor, public double[] faceLength, public double[] faceNormalX, public double[] faceNormalY, public int[] boundaryIds, public int cells, public int faces)Parameters: nodeX: double[], nodeY: double[], cellNodes: int[], cellAreas: double[], cellCenterX: double[], cellCenterY: double[], faceOwner: int[], faceNeighbor: int[], faceLength: double[], faceNormalX: double[], faceNormalY: double[], boundaryIds: int[], cells: int, faces: int
CFD.vectorField2D
export function vectorField2D(StructuredGrid2D grid, double[] x, double[] y, string unitSymbol)->VectorField2DParameters: grid: StructuredGrid2D, x: double[], y: double[], unitSymbol: string
CFD.VectorField2D
export record VectorField2D(public double[] x, public double[] y, public int cellsX, public int cellsY, public string unitSymbol)Parameters: x: double[], y: double[], cellsX: int, cellsY: int, unitSymbol: string
Documentation version
Language 1.0.0, compiler 1.0.0, runtime 1.0.0. This reference is generated from the official SS documentation so package and language details stay consistent with the release.