CG
Version 25
|
All-speed Compressible Navier-Stokes flow solver. More...
#include <Cgasf.h>
Public Member Functions | |
Cgasf (CompositeGrid &cg, GenericGraphicsInterface *ps=NULL, Ogshow *show=NULL, const int &plotOption=1) | |
virtual | ~Cgasf () |
virtual void | addAllSpeedImplicitForcing (realMappedGridFunction &u0, const real t, const real deltaT, int grid) |
virtual void | addForcing (realMappedGridFunction &dvdt, const realMappedGridFunction &u, int iparam[], real rparam[], realMappedGridFunction &dvdtImplicit=Overture::nullRealMappedGridFunction(), realMappedGridFunction *referenceFrameVelocity=NULL) |
virtual void | addForcingToPressureEquation (const int &grid, MappedGrid &c, realMappedGridFunction &f, realMappedGridFunction &gridVelocity, const real &t) |
virtual void | allSpeedImplicitTimeStep (GridFunction &gf0, real &t, real &dt0, int &numberOfSubSteps, const real &nextTimeToPrint) |
virtual int | applyBoundaryConditions (GridFunction &cgf, const int &option=-1, int grid_=-1, GridFunction *puOld=NULL, const real &dt=-1.) |
virtual int | applyBoundaryConditions (const real &t, realMappedGridFunction &u, realMappedGridFunction &gridVelocity, const int &grid, const int &option=-1, realMappedGridFunction *puOld=NULL, realMappedGridFunction *pGridVelocityOld=NULL, const real &dt=-1.) |
virtual void | assignTestProblem (GridFunction &cgf) |
virtual int | buildTimeSteppingDialog (DialogData &dialog) |
Build the dialog that shows the various options for time stepping. | |
virtual void | computeSource (const Index &I1, const Index &I2, const Index &I3, const realArray &v, const realArray &s1, const realArray &s2, const realArray &gam, const realArray &cp, const realArray &r) |
virtual void | formAllSpeedPressureEquation (GridFunction &gf0, real t, real deltaT, const bool &formSteadyEquation=false) |
virtual int | getInterfaceDataOptions (GridFaceDescriptor &info, int &interfaceDataOptions) const |
Return the interface data required for a given type of interface. | |
virtual int | getUt (const realMappedGridFunction &v, const realMappedGridFunction &gridVelocity, realMappedGridFunction &dvdt, int iparam[], real rparam[], realMappedGridFunction &dvdtImplicit=Overture::nullRealMappedGridFunction(), MappedGrid *pmg2=NULL, const realMappedGridFunction *pGridVelocity2=NULL) |
virtual void | getTimeSteppingEigenvalue (MappedGrid &mg, realMappedGridFunction &u, realMappedGridFunction &gridVelocity, real &reLambda, real &imLambda, const int &grid) |
virtual int | getTimeSteppingOption (const aString &answer, DialogData &dialog) |
void | gridAccelerationBC (const int &grid, const real &t0, GridFunction &gf0, realCompositeGridFunction &f0, int side, int axis) |
virtual int | initializeSolution () |
virtual int | interfaceRightHandSide (InterfaceOptionsEnum option, int interfaceDataOptions, GridFaceDescriptor &info, GridFaceDescriptor &gfd, int gfIndex, real t) |
virtual real | maxMachNumber (realMappedGridFunction &u) |
virtual void | printTimeStepInfo (const int &step, const real &t, const real &cpuTime) |
virtual int | setupPde (aString &reactionName, bool restartChosen, IntegerArray &originalBoundaryCondition) |
A virtual function to setup the PDE to be solved. | |
virtual void | solveForAllSpeedPressure (real t, real deltaT, const real &dtRatio) |
virtual void | solveForTimeIndependentVariables (GridFunction &cgf, bool updateSolutionDependentEquations=false) |
: Solve for the pressure given the velocity. | |
virtual int | updateGeometryArrays (GridFunction &cgf) |
Update geometry arrays, solution at old times etc. after the time step has changed. | |
virtual int | updateToMatchGrid (CompositeGrid &cg) |
virtual int | setupGridFunctions () |
Allocate and initialize grid functions, based on the time-stepping method. | |
virtual int | setPlotTitle (const real &t, const real &dt) |
Set the plot titles for interactive plotting. | |
virtual void | saveShowFileComments (Ogshow &show) |
Save comments in the show file. | |
virtual void | writeParameterSummary (FILE *file) |
Public Member Functions inherited from DomainSolver | |
DomainSolver (Parameters &par, CompositeGrid &cg, GenericGraphicsInterface *ps=NULL, Ogshow *show=NULL, const int &plotOption=1) | |
This is the constructor for the base class DomainSolver. | |
virtual | ~DomainSolver () |
Destructor. | |
virtual int | adaptGrids (GridFunction &gf0, int numberOfGridFunctionsToUpdate=0, realCompositeGridFunction *cgf=NULL, realCompositeGridFunction *uWork=NULL) |
virtual int | addArtificialDissipation (realCompositeGridFunction &u, real dt) |
virtual int | addArtificialDissipation (realMappedGridFunction &u, real dt, int grid) |
virtual int | addConstraintEquation (Parameters ¶meters, Oges &solver, realCompositeGridFunction &coeff, realCompositeGridFunction &ucur, realCompositeGridFunction &rhs, const int &numberOfComponents) |
virtual int | addGrids () |
virtual int | advance (real &tFinal) |
virtual void | advanceAdamsPredictorCorrector (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceAdamsPredictorCorrectorNew (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
Advance using an Adams predictor corrector method (new way) | |
virtual void | advanceADI (real &t, real &dt, int &numberOfSubSteps, int &init, int initialStep) |
void | advanceForwardEulerNew (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
Advance using an "forward-Euler" method (new way) | |
virtual void | advanceImplicitMultiStep (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceImplicitMultiStepNew (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
Generic advance routine that uses the separate time sub-step functions. | |
virtual int | advanceLineSolve (LineSolve &lineSolve, const int grid, const int direction, realCompositeGridFunction &u0, realMappedGridFunction &f, realMappedGridFunction &residual, const bool refactor, const bool computeTheResidual=false) |
virtual void | advanceMidPoint (real &t0, real &dt0, int &numberOfSubSteps, int initialStep) |
virtual void | advanceNewton (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceSecondOrderSystem (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceSteadyStateRungeKutta (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceTrapezoidal (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual void | advanceVariableTimeStepAdamsPredictorCorrector (real &t0, real &dt0, int &numberOfSubSteps, int &init, int initialStep) |
virtual int | applyBoundaryConditionsForImplicitTimeStepping (GridFunction &cgf) |
virtual int | applyBoundaryConditionsForImplicitTimeStepping (realMappedGridFunction &u, realMappedGridFunction &uL, realMappedGridFunction &gridVelocity, real t, int scalarSystem, int grid) |
virtual int | assignInitialConditions (int gfIndex) |
Assign initial conditions. | |
virtual int | applyFilter (int gfIndex) |
This function applies a spatial filter to the solution in gf[gfIndex]. | |
virtual int | assignInterfaceBoundaryConditions (GridFunction &cgf, const int &option=-1, int grid_=-1, GridFunction *puOld=NULL, const real &dt=-1.) |
virtual void | bodyForcingCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | boundaryConditionPredictor (const BoundaryConditionPredictorEnum bcpOption, const AdamsPCData &adamsData, const int orderOfExtrapolation, const int mNew, const int mCur, const int mOld, realCompositeGridFunction *puga=NULL, realCompositeGridFunction *pugb=NULL, realCompositeGridFunction *pugc=NULL, realCompositeGridFunction *pugd=NULL) |
Apply operations required before applying the boundary conditions. E.g. extrapolate the pressure in time for fourth-order INS. | |
virtual int | buildAdaptiveGridOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various general options. | |
virtual int | buildAmrGridsForInitialConditions () |
Build the AMR hierarchy of grids for the initial conditions. | |
virtual int | buildForcingOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various forcing options. | |
virtual int | buildGeneralOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various general options. | |
virtual int | buildGrid (Mapping *&newMapping, int newGridNumber, IntegerArray &sharedBoundaryCondition) |
virtual int | buildOutputOptionsDialog (DialogData &dialog) |
Build the output options dialog. | |
virtual void | buildImplicitSolvers (CompositeGrid &cg) |
virtual int | buildMovingGridOptionsDialog (DialogData &dialog) |
Build the dialog that shows the various general options. | |
virtual int | buildPlotOptionsDialog (DialogData &dialog) |
Build the plot options dialog. | |
virtual int | buildRunTimeDialog () |
Build the run time dialog. This dialog appears while a Domain solver is time stepping. | |
void | checkArrays (const aString &label) |
void | checkSolution (const realGridCollectionFunction &u, const aString &title, bool printResults=false) |
int | checkSolution (realMappedGridFunction &u, const aString &title, bool printResults, int grid, real &maxVal, bool printResultsOnFailure=false) |
virtual void | cleanupInitialConditions () |
Cleanup routines after the initial conditions have been assigned. | |
virtual int | computeBodyForcing (GridFunction &gf, const real &tForce) |
Compute the body forcing such as drag models, wake models and heat sources. | |
virtual void | computeNumberOfStepsAndAdjustTheTimeStep (const real &t, const real &tFinal, const real &nextTimeToPrint, int &numberOfSubSteps, real &dtNew, const bool &adjustTimeStep=true) |
virtual void | correctMovingGrids (const real t1, const real t2, GridFunction &cgf1, GridFunction &cgf2) |
Corrector step for moving grids. | |
const int & | debug () const |
virtual void | determineErrors (GridFunction &cgf, const aString &label=nullString) |
virtual void | determineErrors (realCompositeGridFunction &u, realMappedGridFunction **gridVelocity, const real &t, const int options, RealArray &err, const aString &label=nullString) |
virtual void | determineErrors (realMappedGridFunction &v, const real &t) |
virtual void | displayBoundaryConditions (FILE *file=stdout) |
virtual int | displayParameters (FILE *file=stdout) |
Display DomainSolver parameters. | |
virtual int | endTimeStep (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepFE (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepIM (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepPC (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual int | endTimeStepAF (real &t0, real &dt0, AdvanceOptions &advanceOptions) |
End an individual time step (a time sub-step function). | |
virtual void | eulerStep (const real &t1, const real &t2, const real &t3, const real &dt0, GridFunction &cgf1, GridFunction &cgf2, GridFunction &cgf3, realCompositeGridFunction &ut, realCompositeGridFunction &uti, int stepNumber, int &numberOfSubSteps) |
void | extrapolateInterpolationNeighbours (GridFunction &gf, const Range &C) |
Extrapolate interpolation neighbours. | |
virtual int | fixupUnusedPoints (realCompositeGridFunction &u) |
virtual void | formMatrixForImplicitSolve (const real &dt0, GridFunction &cgf1, GridFunction &cgf0) |
virtual int | getAmrErrorFunction (realCompositeGridFunction &u, real t, intCompositeGridFunction &errorFlag, realCompositeGridFunction &error) |
virtual int | getAmrErrorFunction (realCompositeGridFunction &u, real t, realCompositeGridFunction &error, bool computeOnFinestLevel=false) |
virtual realCompositeGridFunction & | getAugmentedSolution (GridFunction &gf0, realCompositeGridFunction &v) |
const aString & | getClassName () const |
virtual int | getAdaptiveGridOption (const aString &answer, DialogData &dialog) |
: Look for a general option in the string "answer" | |
virtual int | getForcingOption (const aString &command, DialogData &dialog) |
: Look for a forcing option in the string "answer" | |
virtual int | getGeneralOption (const aString &answer, DialogData &dialog) |
: Look for a general option in the string "answer" | |
virtual void | getGridInfo (real &totalNumberOfGridPoints, real dsMin[3], real dsAve[3], real dsMax[3], real &maxMax, real &maxMin, real &minMin) |
Evaluate the min and max grid spacing, total number of grid points etc. | |
virtual void | getGridVelocity (GridFunction &gf0, const real &tGV) |
virtual int | getInitialConditions (const aString &command=nullString, DialogData *interface=NULL, GUIState *guiState=NULL, DialogState *dialogState=NULL) |
Determine the type of initial conditions to assign. | |
int | getMaterialProperties (GridFunction &solution, realCompositeGridFunction &matProp) |
Evaluate the variable material parameters (for plotting for example). | |
real | getMovingGridMaximumRelativeCorrection () |
Return the maximum relative change in the moving grid correction scheme. This is usually only an issue for "light" bodies. | |
bool | getMovingGridCorrectionHasConverged () |
Return true if the correction steps for moving grids have converged. This is usually only an issue for "light" bodies. | |
virtual int | getMovingGridOption (const aString &answer, DialogData &dialog) |
: Look for a general option in the string "answer" | |
const aString & | getName () const |
virtual int | getOutputOption (const aString &command, DialogData &dialog) |
: Look for an output option in the string "answer" | |
const aString & | getPdeName () const |
virtual int | getPlotOption (const aString &answer, DialogData &dialog) |
: Look for a plot option in the string "answer" | |
virtual int | getResidual (real t, real dt, GridFunction &cgf, realCompositeGridFunction &residual) |
Compute the residual for "steady state" solvers. | |
int | getResidualInfo (real t0, const realCompositeGridFunction &residual, real &maximumResidual, real &maximuml2, FILE *file=NULL) |
Compute the max and l2 residuals and optionally output the info to a file. | |
virtual void | getSolutionBounds (const realMappedGridFunction &u, realArray &uMin, realArray &uMax, real &uvMax) |
virtual int | getTimeDependentBoundaryConditions (MappedGrid &mg, real t, int grid=0, int side0=-1, int axis0=-1, ForcingTypeEnum forcingType=computeForcing) |
virtual int | getTimeDerivativeOfBoundaryValues (GridFunction &gf0, const real &t, const int &grid, int side=-1, int axis=-1) |
virtual real | getTimeStep (GridFunction &gf) |
virtual real | getTimeStep (MappedGrid &mg, realMappedGridFunction &u, realMappedGridFunction &gridVelocity, const Parameters::TimeSteppingMethod &timeSteppingMethod, const int &grid) |
int | getTimeStepAndNumberOfSubSteps (GridFunction &cgf, int stepNumber, int &numberOfSubSteps, real &dt) |
Compute a new time step and the number sub-steps to reach the next time to print. | |
virtual void | getUt (GridFunction &cgf, const real &t, RealCompositeGridFunction &ut, real tForce) |
virtual void | implicitSolve (const real &dt0, GridFunction &cgf1, GridFunction &cgf0) |
virtual int | initializeInterfaces (GridFunction &cgf) |
virtual int | initializeTimeStepping (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingFE (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingIM (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingPC (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTimeSteppingAF (real &t0, real &dt0) |
Initialize the time stepping (a time sub-step function). | |
virtual int | initializeTurbulenceModels (GridFunction &cgf) |
virtual int | interpolate (GridFunction &cgf, const Range &R=nullRange) |
virtual int | interpolateAndApplyBoundaryConditions (GridFunction &cgf, GridFunction *uOld=NULL, const real &dt=-1.) |
virtual bool | isImplicitMatrixSingular (realCompositeGridFunction &uL) |
virtual int | jetInflow (GridFunction &cgf) |
virtual void | moveGrids (const real &t1, const real &t2, const real &t3, const real &dt0, GridFunction &cgf1, GridFunction &cgf2, GridFunction &cgf3) |
virtual bool | movingGridProblem () const |
virtual int | newAdaptiveGridBuilt (CompositeGrid &cg, realCompositeGridFunction &u, bool updateSolution) |
const int & | numberOfComponents () const |
virtual int | output (GridFunction &gf0, int stepNumber) |
virtual void | outputHeader () |
Output the main header banner that includes info about the grid and parameters. | |
virtual int | outputProbes (GridFunction &gf0, int stepNumber) |
output probe information at a given time | |
virtual void | outputSolution (realCompositeGridFunction &u, const real &t, const aString &label=nullString, int printOption=0) |
virtual void | outputSolution (const realMappedGridFunction &u, const real &t) |
virtual int | parabolicInflow (GridFunction &cgf) |
virtual int | plot (const real &t, const int &optionIn, real &tFinal) |
virtual int | printMemoryUsage (FILE *file=stdout) |
Output information about the memory usage. | |
void | printP (const char *format,...) const |
Domain solver print function with a prefix identifier string. | |
virtual int | printStatistics (FILE *file=stdout) |
Output timing statistics. | |
virtual int | project (GridFunction &cgf) |
virtual int | readRestartFile (realCompositeGridFunction &v, real &t, const aString &restartFileName=nullString) |
virtual int | readRestartFile (GridFunction &cgf, const aString &restartFileName=nullString) |
virtual int | saveSequenceInfo (real t0, const realCompositeGridFunction &residual) |
Save sequence info (such as the norm of the residual) into the time history arrays. | |
virtual int | saveSequencesToShowFile () |
Save sequence info to the show file. | |
virtual int | saveRestartFile (const GridFunction &cgf, const aString &restartFileName) |
virtual void | saveShow (GridFunction &gf0) |
Save a solution in the show file. | |
virtual int | setBoundaryConditionsInteractively (const aString &answer, const IntegerArray &originalBoundaryCondition) |
virtual int | setDefaultDataForBoundaryConditions () |
virtual int | setFinalTime (const real &tFinal) |
Set the time to integrate to. | |
virtual void | setInterfacesAtPastTimes (const real &t1, const real &t2, const real &t3, const real &dt0, GridFunction &cgf1, GridFunction &cgf2, GridFunction &cgf3) |
Assign interface positions for "negative" times. | |
virtual int | setInterfaceBoundaryCondition (GridFaceDescriptor &info) |
Setup an interface boundary condition. | |
void | setName (const aString &name) |
void | setNameOfGridFile (const aString &name) |
Provide the name of the file from which the overlapping grid was read. | |
virtual int | setOgesBoundaryConditions (GridFunction &cgf, IntegerArray &boundaryConditions, RealArray &boundaryConditionData, const int imp) |
virtual int | setParametersInteractively (bool runSetupOnExit=true) |
Assign run-time parameters for the DomainSolver. | |
virtual void | setSensitivity (GUIState &dialog, bool trueOrFalse) |
virtual int | setSolverParameters (const aString &command=nullString, DialogData *interface=NULL) |
Prompt for changes in the solver parameters. | |
virtual void | setup (const real &time=0.) |
Setup routine. | |
virtual int | setupUserDefinedForcing () |
virtual int | setupUserDefinedInitialConditions () |
virtual int | setupUserDefinedMaterialProperties () |
Interactively choose material properties (e.g. rho,mu,lambda for elasticity) | |
virtual int | setVariableBoundaryValues (const real &t, GridFunction &gf0, const int &grid, int side0=-1, int axis0=-1, ForcingTypeEnum forcingType=computeForcing) |
Assign the right-hand-side for variable boundary conditions. | |
virtual int | setVariableMaterialProperties (GridFunction &gf, const real &t) |
Assign variable material properties: user-defined or "body-force" regions. | |
virtual real | sizeOf (FILE *file=NULL) const |
virtual void | smoothVelocity (GridFunction &cgf, const int numberOfSmooths) |
virtual int | solve () |
Solve equations to time tFinal,. | |
virtual int | startTimeStep (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepFE (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepIM (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepPC (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function). | |
virtual int | startTimeStepAF (real &t0, real &dt0, int ¤tGF, int &nextGF, AdvanceOptions &advanceOptions) |
Start an individual time step (a time sub-step function) for an approximate factorization method. | |
virtual void | takeOneStep (real &t, real &dt, int stepNumber, int &numberOfSubSteps) |
Advance one time-step. This function is used by the multi-physics solver Cgmp. | |
virtual int | takeTimeStep (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepFE (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepIM (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepPC (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a single time step (a time sub-step function). | |
virtual int | takeTimeStepAF (real &t0, real &dt0, int correction, AdvanceOptions &advanceOptions) |
Take a time step using the approximate factored scheme. | |
virtual int | timeIndependentBoundaryConditions (GridFunction &cgf) |
virtual void | initializeFactorization () |
virtual int | tracking (GridFunction &gf0, int stepNumber) |
const bool & | twilightZoneFlow () const |
virtual int | userDefinedBoundaryValues (const real &t, GridFunction &gf0, const int &grid, int side0=-1, int axis0=-1, ForcingTypeEnum forcingType=computeForcing) |
Assign user specific values for boundary conditions. | |
virtual void | userDefinedCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | userDefinedGrid (GridFunction &gfct, Mapping *&newMapping, int newGridNumber, IntegerArray &sharedBoundaryCondition) |
virtual int | userDefinedForcing (realCompositeGridFunction &f, GridFunction &gf, const real &tForce) |
User defined forcing. Compute a user defined forcing that will be added to the right-hand side of the equations. This function is called to actually evaluate the user defined forcing The function setupUserDefinedForcing is first called to assign the option and parameters. Rewrite or add new options to this function and to setupUserDefinedForcing to supply your own forcing option. | |
virtual void | userDefinedForcingCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | userDefinedInitialConditions (CompositeGrid &cg, realCompositeGridFunction &u) |
virtual void | userDefinedInitialConditionsCleanup () |
virtual int | userDefinedMaterialProperties (GridFunction &gf) |
Assign the user defined material properties. | |
virtual void | userDefinedMaterialPropertiesCleanup () |
This routine is called when DomainSolver is finished and can be used to clean up memory. | |
virtual int | userDefinedOutput (GridFunction &gf, int stepNumber) |
virtual int | updateForAdaptiveGrids (CompositeGrid &cg) |
virtual int | updateForMovingGrids (GridFunction &cgf) |
Update the DomainSolver after grids have moved or have been adapted. | |
virtual int | updateForNewTimeStep (GridFunction &gf, const real &dt) |
Update the geometry arrays. | |
virtual int | updateToMatchNewGrid (CompositeGrid &cgNew, IntegerArray &changes, IntegerArray &sharedBoundaryCondition, GridFunction &gf0) |
virtual int | updateStateVariables (GridFunction &cgf, int stage=-1) |
Ths function is used to update state-variables. For example, the visco plastic viscosity. | |
virtual void | updateTimeIndependentVariables (CompositeGrid &cg0, GridFunction &cgf) |
virtual int | updateVariableTimeInterpolation (int newGrid, GridFunction &cgf) |
virtual int | updateWorkSpace (GridFunction &gf0) |
virtual int | variableTimeStepBoundaryInterpolation (int grid, GridFunction &cgf) |
realCompositeGridFunction & | p () const |
realCompositeGridFunction & | px () const |
realCompositeGridFunction & | rL () const |
realCompositeGridFunction & | pL () const |
realCompositeGridFunction & | rho () const |
realCompositeGridFunction & | gam () const |
Protected Attributes | |
std::vector< real > | gridMachNumber |
int | numberOfImplicitSolves |
bool | refactorImplicitMatrix |
Protected Attributes inherited from DomainSolver | |
aString | name |
aString | className |
aString | pdeName |
int | restartNumber |
DialogData * | pUniformFlowDialog |
DialogData * | pStepFunctionDialog |
DialogData * | pShowFileDialog |
DialogData * | pTzOptionsDialog |
int | chooseAComponentMenuItem |
int | numberOfPushButtons |
int | numberOfTextBoxes |
int | itemsToPlot |
Additional Inherited Members | |
Public Types inherited from DomainSolver | |
enum | { defaultValue =-1234567 } |
enum | ForcingTypeEnum { computeForcing, computeTimeDerivativeOfForcing } |
enum | BoundaryConditionPredictorEnum { predictPressure, predictPressureAndVelocity } |
enum | InterfaceOptionsEnum { getInterfaceRightHandSide, setInterfaceRightHandSide } |
enum | Dimensions { maximumNumberOfGridFunctionsToUse =4, maximumNumberOfExtraFunctionsToUse =4 } |
enum | ChangesEnum { gridWasAdded =1, gridWasChanged, gridWasRemoved, refinementWasAdded, refinementWasRemoved } |
Static Public Member Functions inherited from DomainSolver | |
static int | getBounds (const realCompositeGridFunction &u, RealArray &uMin, RealArray &uMax, real &uvMax) |
static int | getOriginalBoundaryConditions (CompositeGrid &cg, IntegerArray &originalBoundaryCondition) |
Save the original boundary conditions from the CompositeGrid. | |
Public Attributes inherited from DomainSolver | |
CompositeGrid & | cg |
OgesParameters | pressureSolverParameters |
OgesParameters | implicitTimeStepSolverParameters |
CompositeGridOperators | finiteDifferenceOperators |
real | dt |
int | numberOfStepsTaken |
Parameters & | parameters |
GridFunction | gf [maximumNumberOfGridFunctionsToUse] |
int | current |
int | movieFrame |
aString | movieFileName |
int | numberOfGridFunctionsToUse |
int | numberOfExtraFunctionsToUse |
int | totalNumberOfArrays |
realCompositeGridFunction | fn [maximumNumberOfExtraFunctionsToUse] |
RealArray | variableDt |
RealArray | variableTime |
realArray * | ui |
RealArray | tv |
RealArray | tvb |
RealArray | tv0 |
realCompositeGridFunction | coeff |
int | numberOfImplicitSolvers |
Oges * | implicitSolver |
realCompositeGridFunction * | implicitCoeff |
Oges * | poisson |
realCompositeGridFunction | pressureRightHandSide |
realCompositeGridFunction | poissonCoefficients |
realCompositeGridFunction * | pp |
realCompositeGridFunction * | ppx |
realCompositeGridFunction * | prL |
realCompositeGridFunction * | ppL |
realCompositeGridFunction * | prho |
realCompositeGridFunction * | pgam |
realCompositeGridFunction * | pvIMS |
realCompositeGridFunction * | pwIMS |
realCompositeGridFunction * | previousPressure |
realCompositeGridFunction * | puLinearized |
realMappedGridFunction * | pGridVelocityLinearized |
LineSolve * | pLineSolve |
bool | gridHasMaterialInterfaces |
realCompositeGridFunction * | pdtVar |
std::vector< real > | hMin |
std::vector< real > | hMax |
std::vector< real > | numberOfGridPoints |
std::vector< real > | dtv |
std::vector< real > | realPartOfEigenvalue |
std::vector< real > | imaginaryPartOfEigenvalue |
int | numberSavedToShowFile |
CG_ApproximateFactorization::FactorList | factors |
All-speed Compressible Navier-Stokes flow solver.
The all-speed solver can solve the compressible Navier-Stokes equations for low to moderate Mach numbers.
Cgasf::Cgasf | ( | CompositeGrid & | cg, |
GenericGraphicsInterface * | ps = NULL , |
||
Ogshow * | show = NULL , |
||
const int & | plotOption = 1 |
||
) |
|
virtual |
References DomainSolver::parameters.
|
virtual |
References a0, Parameters::dbase, e, getIndex(), grid, I1, I2, I3, P, DomainSolver::parameters, DomainSolver::pL(), PX, PY, PZ, R, DomainSolver::rho(), DomainSolver::rL(), u0, UX, v0y, VY, WZ, and x.
Referenced by allSpeedImplicitTimeStep().
|
virtual |
Reimplemented from DomainSolver.
References Parameters::computeImplicitTermsSeparately, Parameters::crankNicolson, Parameters::dbase, AsfParameters::defaultAlgorithm, AsfParameters::densityFromGasLawAlgorithm, e, Parameters::getGridIsImplicit(), getIndex(), grid, I1, I2, I3, mu, OV_ABORT(), P, DomainSolver::parameters, DomainSolver::pL(), PT, PX, PY, PZ, R, DomainSolver::rho(), DomainSolver::rL(), RT, RX, RXX, RY, RYY, s, T, TT, TX, TXX, TY, TYY, TZ, TZZ, U, u0, u0y, u0z, ut(), UT, UX, UXX, UXY, UXZ, UY, UYY, UZ, UZZ, V, v0x, v0y, v0z, VT, VX, VXX, VXY, VY, VYY, VYZ, VZ, VZZ, W, w0x, w0y, WT, WX, WXX, WXZ, WY, WYY, WYZ, WZ, WZZ, and x.
Referenced by getUt().
|
virtual |
References axis, AsfParameters::convectiveOutflow, Parameters::dbase, DomainSolver::debug(), e, f, ForBoundary, getGhostIndex(), Parameters::gridIsMoving(), I1, I2, I3, mixedCoeff, mixedNormalCoeff, mu, normal, DomainSolver::numberOfComponents(), P0, P02N, P03N, DomainSolver::parameters, pc, PN2, DomainSolver::rho(), side, AsfParameters::subSonicOutflow, AsfParameters::tractionFree, DomainSolver::twilightZoneFlow(), U, u0, uc, vc, and wc.
Referenced by solveForAllSpeedPressure().
|
virtual |
Reimplemented from DomainSolver.
References a0, a2, addAllSpeedImplicitForcing(), all, applyBoundaryConditions(), asfAddGradP, assign(), axis, b0, c, GridFunction::cg, DomainSolver::cg, DomainSolver::current, Parameters::dbase, DomainSolver::debug(), AsfParameters::densityFromGasLawAlgorithm, DomainSolver::determineErrors(), dimension, DomainSolver::dt, AdamsPCData::dtp, dx, e, f, DomainSolver::fn, ForBoundary, DomainSolver::gam(), DomainSolver::getGridVelocity(), getIndex(), DomainSolver::getTimeStep(), getUt(), DomainSolver::gf, grid, Parameters::gridIsMoving(), gridType, i1, I1, i2, I2, i3, I3, includeGhost, DomainSolver::interpolate(), isRectangular, m1, AdamsPCData::mab0, AdamsPCData::mab1, mask, maskLocal, mg, DomainSolver::moveGrids(), DomainSolver::movingGridProblem(), N(), AdamsPCData::nab0, AdamsPCData::nab1, AdamsPCData::nab2, DomainSolver::numberOfComponents(), numberOfImplicitSolves, ok, omega, operators, orderOfAccuracy, DomainSolver::p(), DomainSolver::parameters, pc, DomainSolver::pL(), DomainSolver::pressureRightHandSide, DomainSolver::prho, DomainSolver::px(), refactorImplicitMatrix, rhs(), DomainSolver::rL(), S, Parameters::secondOrderBDF, side, solveForAllSpeedPressure(), GridFunction::t, tc, DomainSolver::twilightZoneFlow(), GridFunction::u, u, u0, uc, DomainSolver::updateForMovingGrids(), v, V, vc, wc, and x.
|
virtual |
Reimplemented from DomainSolver.
References DomainSolver::applyBoundaryConditions().
Referenced by allSpeedImplicitTimeStep().
|
virtual |
Reimplemented from DomainSolver.
References a0, a2, axis, Parameters::axisymmetric, boundaryCondition(), convectiveOutflow, AsfParameters::convectiveOutflow, Parameters::dbase, DomainSolver::debug(), AsfParameters::densityFromGasLawAlgorithm, dirichlet, dirichletBoundaryCondition, Parameters::dirichletBoundaryCondition, display(), Parameters::getBoundaryData(), Parameters::gridIsMoving(), gridMachNumber, Parameters::implicitAllSpeed, mg, mixedCoeff, mixedNormalCoeff, mixedRHS, nc, Parameters::neumannBoundaryCondition, noSlipWall, Parameters::noSlipWall, DomainSolver::numberOfComponents(), DomainSolver::parameters, pc, DomainSolver::pressureRightHandSide, printF(), side, slipWall, Parameters::slipWall, AsfParameters::subSonicInflow, AsfParameters::subSonicOutflow, symmetry, Parameters::symmetry, tc, tractionFree, AsfParameters::tractionFree, uc, and V.
|
virtual |
Reimplemented from DomainSolver.
References assert(), axis, boundaryCondition(), GridFunction::cg, DomainSolver::cg, Parameters::dbase, dimension, getIndex(), grid, i1, I1, i2, I2, i3, I3, AsfParameters::laminarFlame, Reactions::mp, mp, Reactions::mw(), MaterialProperties::newtonMeterSquaredPerAtmosphere, DomainSolver::parameters, pc, MaterialProperties::R, s, Reactions::setPressureIsConstant(), Reactions::setPressureLevel(), Reactions::setScales(), side, AsfParameters::subSonicInflow, AsfParameters::subSonicOutflow, tc, GridFunction::u, u, u0, and uc.
Referenced by setupGridFunctions().
|
virtual |
Build the dialog that shows the various options for time stepping.
dialog | (input) : graphics dialog to use. |
Dialog Menu Options:
Reimplemented from DomainSolver.
References assert(), DomainSolver::buildTimeSteppingDialog(), and Parameters::numberOfTimeSteppingMethods.
|
virtual |
References assert(), cp, Reactions::cp(), Parameters::dbase, Reactions::h(), Reactions::mp, mp, Reactions::mw(), DomainSolver::parameters, pc, MaterialProperties::R, r, s, S, sigma, Reactions::sigmaFromPTY(), tc, and v.
Referenced by getUt().
|
virtual |
References a, a0, axis, Parameters::bcNames, boundaryCondition(), c, GridFunction::cg, DomainSolver::cg, DomainSolver::coeff, AsfParameters::convectiveOutflow, Parameters::dbase, DomainSolver::debug(), dirichlet, Parameters::dirichletBoundaryCondition, display(), FOR_3D, FOR_4D, ForBoundary, DomainSolver::gam(), getIndex(), grid, i1, I1, i2, I2, i3, I3, DomainSolver::implicitSolver, includeGhost, m, M123, mg, mixedCoeff, mixedNormalCoeff, DomainSolver::movingGridProblem(), Parameters::noSlipWall, DomainSolver::numberOfComponents(), ok, operators, DomainSolver::p(), DomainSolver::parameters, pc, DomainSolver::pL(), printF(), refactorImplicitMatrix, DomainSolver::rho(), DomainSolver::rL(), side, Parameters::slipWall, AsfParameters::subSonicInflow, AsfParameters::subSonicOutflow, AsfParameters::tractionFree, and GridFunction::u.
Referenced by solveForAllSpeedPressure(), and solveForTimeIndependentVariables().
|
virtual |
Return the interface data required for a given type of interface.
info | (input) : the descriptor for the interface. |
interfaceDataOptions | (output) : a list of items from Parameters::InterfaceDataEnum that define which data to get (or which data were set). Multiple items are chosen by bit-wise or of the different options |
Reimplemented from DomainSolver.
References axis, GridFaceDescriptor::axis, Parameters::dbase, GridFaceDescriptor::grid, grid, Parameters::heatFluxInterface, Parameters::heatFluxInterfaceData, OV_ABORT(), DomainSolver::parameters, Parameters::positionInterfaceData, DomainSolver::printP(), side, GridFaceDescriptor::side, and Parameters::tractionInterface.
|
virtual |
Reimplemented from DomainSolver.
References a, anu, asfdts, assert(), axis, Parameters::dbase, DomainSolver::debug(), dir, dr1, dx, Parameters::getGridIsImplicit(), getIndex(), grid, Parameters::gridIsMoving(), gridMachNumber, gridType, DomainSolver::hMin, I1, I2, I3, Parameters::isAxisymmetric(), Parameters::isMovingGridProblem(), isRectangular, maxMachNumber(), MN, mu, N(), n, DomainSolver::numberOfComponents(), ok, orderOfAccuracy, DomainSolver::parameters, pc, DomainSolver::pdtVar, DomainSolver::pL(), DomainSolver::ppL, printF(), DomainSolver::prL, DomainSolver::rL(), RX, rx, rxx, tc, u, u0, uc, ux, uy, uz, vc, wc, and xab.
|
virtual |
Reimplemented from DomainSolver.
References Parameters::adamsBashforth2, Parameters::adamsPredictorCorrector2, Parameters::adamsPredictorCorrector4, assert(), Parameters::backwardEuler, Parameters::crankNicolson, Parameters::dbase, Parameters::forwardEuler, DomainSolver::getTimeSteppingOption(), Parameters::implicit, Parameters::implicitAllSpeed, Parameters::implicitAllSpeed2, Parameters::lineImplicit, Parameters::midPoint, Parameters::notImplicit, DomainSolver::parameters, printF(), Parameters::rKutta, Parameters::setGridIsImplicit(), Parameters::steadyStateNewton, Parameters::steadyStateRungeKutta, and Parameters::variableTimeStepAdamsPredictorCorrector.
|
virtual |
Reimplemented from DomainSolver.
References AD2, ad21, ad22, addForcing(), anu, asfdt, assert(), axis, cd22, Parameters::computeImplicitTermsSeparately, computeSource(), AsfParameters::convectiveOutflow, cp, Parameters::crankNicolson, Parameters::dbase, DomainSolver::debug(), AsfParameters::defaultAlgorithm, Reactions::diffusion(), display(), dw, dx, DomainSolver::gam(), Parameters::getGridIsImplicit(), getIndex(), Reactions::getPressureIsConstant(), grid, Parameters::gridIsMoving(), gridType, I1, I2, I3, includeGhost, Parameters::isAxisymmetric(), Parameters::isMovingGridProblem(), isRectangular, kc, lambda, Reactions::massFractionToMoleFraction(), maxMachNumber(), mg, mu, N(), n, normal, DomainSolver::numberOfComponents(), ok, orderOfAccuracy, P0, DomainSolver::parameters, pc, DomainSolver::pL(), DomainSolver::ppL, printF(), DomainSolver::prL, r, DomainSolver::rho(), DomainSolver::rL(), s, S, side, tc, Reactions::thermalConductivity(), u, U, u0, u0y, u0z, uc, uLocal, ut(), ux, uxx, UXX, UXY, UXZ, uy, UYY, UYZ, uz, UZZ, v, v0x, v0y, v0z, vc, Reactions::viscosity(), w0x, w0y, wc, and x.
Referenced by allSpeedImplicitTimeStep().
void Cgasf::gridAccelerationBC | ( | const int & | grid, |
const real & | t0, | ||
GridFunction & | gf0, | ||
realCompositeGridFunction & | f0, | ||
int | side, | ||
int | axis | ||
) |
References axis, Parameters::bcIsTimeDependent(), c, GridFunction::cg, Parameters::dbase, f, Parameters::getBoundaryData(), getGhostIndex(), GridFunction::getGridVelocity(), DomainSolver::getTimeDerivativeOfBoundaryValues(), grid, Parameters::gridIsMoving(), I1, I2, I3, normal, DomainSolver::parameters, side, GridFunction::u, u, uc, vc, and wc.
Referenced by solveForTimeIndependentVariables().
|
virtual |
Reimplemented from DomainSolver.
References all, assign(), GridFunction::cg, DomainSolver::cg, DomainSolver::correctMovingGrids(), DomainSolver::current, Parameters::dbase, DomainSolver::dt, DomainSolver::gam(), DomainSolver::getTimeStep(), DomainSolver::gf, grid, DomainSolver::initializeSolution(), DomainSolver::movingGridProblem(), DomainSolver::parameters, pc, DomainSolver::pgam, DomainSolver::pL(), DomainSolver::ppL, printF(), DomainSolver::prL, DomainSolver::rL(), solveForTimeIndependentVariables(), GridFunction::u, and u0.
|
virtual |
Reimplemented from DomainSolver.
|
virtual |
References Parameters::dbase, display(), e, getIndex(), I1, I2, I3, maskLocal, DomainSolver::parameters, printF(), u, and uLocal.
Referenced by getTimeSteppingEigenvalue(), and getUt().
|
virtual |
Reimplemented from DomainSolver.
References DomainSolver::checkArrays(), DomainSolver::current, Parameters::dbase, DomainSolver::debug(), DomainSolver::determineErrors(), DomainSolver::dt, DomainSolver::getBounds(), DomainSolver::gf, i, Parameters::isSteadyStateSolver(), n, DomainSolver::numberOfComponents(), DomainSolver::outputSolution(), DomainSolver::parameters, and uc.
|
virtual |
Save comments in the show file.
show | (input) : show file. |
Reimplemented from DomainSolver.
References Parameters::dbase, i, and DomainSolver::parameters.
|
virtual |
Set the plot titles for interactive plotting.
t | (input) : current time |
dt | (input) : current time step |
Reimplemented from DomainSolver.
References Parameters::dbase, and DomainSolver::parameters.
|
virtual |
Allocate and initialize grid functions, based on the time-stepping method.
This function is called by DomainSolver::setup (DomainSolver.C)
Reimplemented from DomainSolver.
References all, assert(), assignTestProblem(), DomainSolver::cg, DomainSolver::coeff, DomainSolver::current, Parameters::dbase, DomainSolver::gf, DomainSolver::implicitSolver, DomainSolver::numberOfImplicitSolvers, operators, DomainSolver::p(), DomainSolver::parameters, DomainSolver::pp, DomainSolver::ppx, DomainSolver::pressureRightHandSide, DomainSolver::px(), DomainSolver::setupGridFunctions(), AsfParameters::standard, and GridFunction::u.
|
virtual |
A virtual function to setup the PDE to be solved.
This function is called at the very start in order to setup the equations to be solved etc.
reactionName | (input) : |
restartChosen | (input) : |
originalBoundaryCondition | (input) : |
Reimplemented from DomainSolver.
References assert(), Parameters::backwardEuler, DomainSolver::cg, Parameters::chemkinReaction, DomainSolver::current, Parameters::dbase, equationDomainList, DomainSolver::getName(), DomainSolver::getOriginalBoundaryConditions(), DomainSolver::gf, grid, ListOfEquationDomains::gridDomainNumberList, i, Parameters::implicitAllSpeed, DomainSolver::name, DomainSolver::parameters, DomainSolver::pdeName, printF(), DomainSolver::readRestartFile(), GridFunction::u, u, update(), and SurfaceEquation::update().
|
virtual |
***** three dimensions ****
References a0, addForcingToPressureEquation(), asfAssignPressureRhs, assign(), axis, Parameters::bcNames, boundaryCondition(), c, GridFunction::cg, DomainSolver::cg, AsfParameters::convectiveOutflow, DAI2, Parameters::dbase, DomainSolver::debug(), Parameters::dirichletBoundaryCondition, display(), DomainSolver::dt, dx, e, f, DomainSolver::fn, ForBoundary, formAllSpeedPressureEquation(), DomainSolver::gam(), getGhostIndex(), getIndex(), DomainSolver::gf, grid, Parameters::gridIsMoving(), gridType, GridFunction::gridVelocity, DomainSolver::hMin, I1, I2, I3, DomainSolver::implicitSolver, includeGhost, isRectangular, m1, AdamsPCData::mab0, AdamsPCData::mab1, maskLocal, mg, mixedCoeff, mixedNormalCoeff, mixedRHS, DomainSolver::movingGridProblem(), mu, AdamsPCData::nab0, AdamsPCData::nab1, AdamsPCData::nab2, normal, Parameters::noSlipWall, DomainSolver::numberOfComponents(), numberOfImplicitSolves, ok, omega, operators, orderOfAccuracy, DomainSolver::p(), DomainSolver::parameters, pc, DomainSolver::pL(), DomainSolver::pp, DomainSolver::pressureRightHandSide, printF(), DomainSolver::px(), refactorImplicitMatrix, DomainSolver::rL(), side, Parameters::slipWall, AsfParameters::subSonicInflow, AsfParameters::subSonicOutflow, tc, AsfParameters::tractionFree, DomainSolver::twilightZoneFlow(), GridFunction::u, u, u0, uc, uLocal, v, vc, wc, and x.
Referenced by allSpeedImplicitTimeStep().
|
virtual |
: Solve for the pressure given the velocity.
updateSolutionDependentEquations | (input) : update the equations as needed if they depend on the current solution. |
Reimplemented from DomainSolver.
References axis, Parameters::bcNames, boundaryCondition(), c, GridFunction::cg, DomainSolver::cg, AsfParameters::convectiveOutflow, Parameters::dbase, DomainSolver::debug(), Parameters::dirichletBoundaryCondition, display(), e, f, ForBoundary, formAllSpeedPressureEquation(), getGhostIndex(), getIndex(), grid, gridAccelerationBC(), Parameters::gridIsMoving(), GridFunction::gridVelocity, I1, I2, I3, DomainSolver::implicitSolver, includeGhost, isRectangular, maskLocal, mg, mixedCoeff, mixedNormalCoeff, mixedRHS, mu, N(), normal, Parameters::noSlipWall, DomainSolver::numberOfComponents(), ok, DomainSolver::p(), DomainSolver::parameters, pc, PN1, PN2, PN3, DomainSolver::pressureRightHandSide, side, Parameters::slipWall, AsfParameters::subSonicInflow, AsfParameters::subSonicOutflow, AsfParameters::tractionFree, DomainSolver::twilightZoneFlow(), GridFunction::u, u, u0, uc, uLocal, ux, uxx, uy, uz, V, vc, wc, and x.
Referenced by initializeSolution().
|
virtual |
Update geometry arrays, solution at old times etc. after the time step has changed.
Reimplemented from DomainSolver.
References GridFunction::cg, DomainSolver::cg, DomainSolver::debug(), grid, gridMachNumber, mg, printF(), and DomainSolver::updateGeometryArrays().
|
virtual |
Reimplemented from DomainSolver.
References all, Parameters::dbase, DomainSolver::gam(), DomainSolver::parameters, DomainSolver::pgam, DomainSolver::pL(), DomainSolver::ppL, printF(), DomainSolver::prL, DomainSolver::rL(), and DomainSolver::updateToMatchGrid().
|
virtual |
Reimplemented from DomainSolver.
References Parameters::backwardEuler, Parameters::crankNicolson, Parameters::dbase, Parameters::implicitAllSpeed, AsfParameters::laminarFlame, Parameters::notImplicit, DomainSolver::parameters, Parameters::secondOrderBDF, AsfParameters::standard, and DomainSolver::writeParameterSummary().
|
protected |
Referenced by applyBoundaryConditions(), Cgasf(), getTimeSteppingEigenvalue(), and updateGeometryArrays().
|
protected |
Referenced by allSpeedImplicitTimeStep(), Cgasf(), and solveForAllSpeedPressure().
|
protected |
Referenced by allSpeedImplicitTimeStep(), Cgasf(), formAllSpeedPressureEquation(), and solveForAllSpeedPressure().