CG  Version 25
Public Member Functions | List of all members
Cgcns Class Reference

Solve the Compressible Navier-Stokes and Euler equations. More...

#include <Cgcns.h>

Inheritance diagram for Cgcns:
Inheritance graph
[legend]
Collaboration diagram for Cgcns:
Collaboration graph
[legend]

Public Member Functions

 Cgcns (CompositeGrid &cg, GenericGraphicsInterface *ps=NULL, Ogshow *show=NULL, const int &plotOption=1)
 Constructor for the Cgcns class.
 
virtual ~Cgcns ()
 Destructor.
 
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.)
 Apply boundary conditions.
 
virtual int applyBoundaryConditionsForImplicitTimeStepping (realMappedGridFunction &rhs, realMappedGridFunction &uL, realMappedGridFunction &gridVelocity, real t, int scalarSystem, int grid)
 Fill in the boundary conditions for the right-hand-side of the implicit time-stepping equations.
 
virtual int addConstraintEquation (Parameters &parameters, Oges &solver, realCompositeGridFunction &coeff, realCompositeGridFunction &ucur, realCompositeGridFunction &rhs, const int &numberOfComponents)
 Add constraint equations to the implicit time-stepping matrix.
 
virtual void addForcing (realMappedGridFunction &dvdt, const realMappedGridFunction &u, int iparam[], real rparam[], realMappedGridFunction &dvdtImplicit=Overture::nullRealMappedGridFunction(), realMappedGridFunction *referenceFrameVelocity=NULL)
 Add body forcing to du/dt.
 
virtual void assignTestProblem (GridFunction &cgf)
 
virtual void buildImplicitSolvers (CompositeGrid &cg)
 Allocate the appropriate number of implicit solvers (Oges objects)
 
virtual int buildTimeSteppingDialog (DialogData &dialog)
 Build the dialog that shows the various options for time stepping.
 
virtual void formMatrixForImplicitSolve (const real &dt0, GridFunction &cgf1, GridFunction &cgf0)
 Form the matrix for implicit time stepping.
 
virtual int formImplicitTimeSteppingMatrix (realMappedGridFunction &coeff, const real &dt0, int scalarSystem, realMappedGridFunction &uL, const int &grid)
 
virtual realCompositeGridFunction & getAugmentedSolution (GridFunction &gf0, realCompositeGridFunction &v)
 Return a grid function for plotting and for output that may contain extra variables, such as errors or such as the pressure for the compressible NS.
 
virtual int getInterfaceDataOptions (GridFaceDescriptor &info, int &interfaceDataOptions) const
 Return the interface data required for a given type of interface.
 
virtual void getTimeSteppingEigenvalue (MappedGrid &mg, realMappedGridFunction &u, realMappedGridFunction &gridVelocity, real &reLambda, real &imLambda, const int &grid)
 Determine the real and imaginary parts of the eigenvalue for time stepping.
 
virtual int getTimeSteppingOption (const aString &answer, DialogData &dialog)
 Look for a time stepping option in the string "answer.
 
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)
 Evaluate du/dt for the Navier-Stokes or Euler equations.
 
virtual void implicitSolve (const real &dt0, GridFunction &cgf1, GridFunction &cgf0)
 Solve the implicit time-stepping equations.
 
virtual int initializeSolution ()
 Initialize the solution, project velocity if required.
 
virtual int interfaceRightHandSide (InterfaceOptionsEnum option, int interfaceDataOptions, GridFaceDescriptor &info, GridFaceDescriptor &gfd, int gfIndex, real t)
 
virtual bool isImplicitMatrixSingular (realCompositeGridFunction &uL)
 Return true if the implicit time-stepping matrix is singular.
 
virtual void printTimeStepInfo (const int &step, const real &t, const real &cpuTime)
 Print time-step information about the current solution in a nicely formatted way.
 
virtual int project (GridFunction &cgf)
 Project the initial conditions of a steady state newton solver on the linear solution.
 
virtual void saveShowFileComments (Ogshow &show)
 Save comments to the show file that will appear as the top label when viewed with plotStuff.
 
virtual int setPlotTitle (const real &t, const real &dt)
 Set the plot titles for interactive plotting.
 
virtual int setupGridFunctions ()
 Perform initialization steps for Cgcns; build geometry arrays etc.
 
virtual int setupPde (aString &reactionName, bool restartChosen, IntegerArray &originalBoundaryCondition)
 A virtual function to setup the PDE to be solved.
 
virtual int updateGeometryArrays (GridFunction &cgf)
 Update geometry arrays when the grid has changed (called by adaptGrids for example).
 
virtual int updateStateVariables (GridFunction &cgf, int stage=-1)
 Ths function is used to update state-variables. For example, the visco plastic viscosity.
 
virtual int updateToMatchGrid (CompositeGrid &cg)
 Update the solver to match a new grid.
 
virtual void writeParameterSummary (FILE *)
 Output parameter values to the header information that is printed near the start of the computation.
 
- 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 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 void allSpeedImplicitTimeStep (GridFunction &gf, real &t, real &dt0, int &numberOfTimeSteps, const real &nextTimeToPrint)
 
virtual int applyBoundaryConditions (GridFunction &cgf, const int &option=-1, int grid_=-1, GridFunction *puOld=NULL, const real &dt=-1.)
 
virtual int applyBoundaryConditionsForImplicitTimeStepping (GridFunction &cgf)
 
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 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 int getAmrErrorFunction (realCompositeGridFunction &u, real t, intCompositeGridFunction &errorFlag, realCompositeGridFunction &error)
 
virtual int getAmrErrorFunction (realCompositeGridFunction &u, real t, realCompositeGridFunction &error, bool computeOnFinestLevel=false)
 
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 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 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 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 void solveForTimeIndependentVariables (GridFunction &cgf, bool updateSolutionDependentEquations=false)
 : Solve for the pressure given the velocity.
 
virtual int startTimeStep (real &t0, real &dt0, int &currentGF, int &nextGF, AdvanceOptions &advanceOptions)
 Start an individual time step (a time sub-step function).
 
virtual int startTimeStepFE (real &t0, real &dt0, int &currentGF, int &nextGF, AdvanceOptions &advanceOptions)
 Start an individual time step (a time sub-step function).
 
virtual int startTimeStepIM (real &t0, real &dt0, int &currentGF, int &nextGF, AdvanceOptions &advanceOptions)
 Start an individual time step (a time sub-step function).
 
virtual int startTimeStepPC (real &t0, real &dt0, int &currentGF, int &nextGF, AdvanceOptions &advanceOptions)
 Start an individual time step (a time sub-step function).
 
virtual int startTimeStepAF (real &t0, real &dt0, int &currentGF, 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 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
 

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
 
Parametersparameters
 
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
 
LineSolvepLineSolve
 
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
 
- 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
 

Detailed Description

Solve the Compressible Navier-Stokes and Euler equations.

Cgcns can be used to solve the compressible Navier-Stokes and reactive Euler equations on moving grids with adaptive mesh refinement.

Constructor & Destructor Documentation

Cgcns::Cgcns ( CompositeGrid &  cg_,
GenericGraphicsInterface *  ps = NULL,
Ogshow *  show = NULL,
const int &  plotOption_ = 1 
)

Constructor for the Cgcns class.

Parameters
cg_(input) : use this CompositeGrid.
ps(input) : pointer to a graphics object to use.
show(input) : pointer to a show file to use.
plotOption_(input) : plot option
Note
CnsParameters (passed to the DomainSolver constructor above) replaces the base class Parameters

References DomainSolver::cg, DomainSolver::className, DomainSolver::imaginaryPartOfEigenvalue, DomainSolver::name, and DomainSolver::realPartOfEigenvalue.

Cgcns::~Cgcns ( )
virtual

Destructor.

References DomainSolver::parameters.

Member Function Documentation

int Cgcns::addConstraintEquation ( Parameters parameters,
Oges &  solver,
realCompositeGridFunction &  coeff,
realCompositeGridFunction &  ucur,
realCompositeGridFunction &  rhs,
const int &  numberOfComponents 
)
virtual

Add constraint equations to the implicit time-stepping matrix.

Parameters
parameters(input) :
solver(input) :
coeff(input) :
ucur(input) :
rhs(input) :
numberOfComponents(input) :

Reimplemented from DomainSolver.

References a, all, assign(), c, DomainSolver::cg, Parameters::dbase, getIndex(), grid, I1, I2, I3, Parameters::isAxisymmetric(), mg, tc, uc, vc, and wc.

Referenced by formMatrixForImplicitSolve().

void Cgcns::addForcing ( realMappedGridFunction &  dvdt,
const realMappedGridFunction &  u,
int  iparam[],
real  rparam[],
realMappedGridFunction &  dvdtImplicit = Overture::nullRealMappedGridFunction(),
realMappedGridFunction *  referenceFrameVelocity = NULL 
)
virtual

Add body forcing to du/dt.

For flows in the twilight-zone, add twilight-zone forcing.

Parameters
dvdt(input/output) : add the explicit body forcing here.
u(input) : current solution.
iparam(input) : integer parameters
rparam(input) : real parameters
dvdtImplicit(input/output) : add the implicit body forcing here.

Reimplemented from DomainSolver.

References all, assert(), CnsParameters::compressibleMultiphase, CnsParameters::compressibleNavierStokes, CnsParameters::conservativeGodunov, CnsParameters::conservativeWithArtificialDissipation, Parameters::dbase, DomainSolver::debug(), display(), e, getIndex(), gm1, grid, Parameters::gridIsMoving(), h, I1, I2, I3, isRectangular, mg, mu, CnsParameters::multiComponentVersion, ok, OV_ABORT(), DomainSolver::parameters, printF(), rad, tc, u0, u0y, u0z, uc, ut(), uvt, uvxx, uvyy, uvzz, v0x, v0y, v0z, vc, w0x, w0y, wc, and x.

Referenced by getUt().

int Cgcns::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

Apply boundary conditions.

Most the methods implemented in Cgcns use this routine to assign boundary conditions.

Parameters
t(input):
u(input/output) : apply to this grid function.
gridVelocity(input) : the grid velocity if gridIsMoving==true.
grid(input) : the grid number if this MappedGridFunction is part of a CompositeGridFunction.
option(input): not used here.
puOld(input): pointer to the solution at an old time (only used for some BC's).
pGridVelocityOld(input): pointer to the grid velocity at an old time (only used for some BC's).
dt(input): time step.
Note
Note on the bcData array: Boundary condition parameter values are stored in the array bcData. Let nc=numberOfComponents, then the values
bcData(i,side,axis,grid) : i=0,1,...,nc-1
would normally represent the RHS values for dirichlet BC's on component i, such as
u(i1,i2,i3,i) = bcData(i,side,axis,grid)
For a Mixed-derivative boundary condition, the parameters (a0,a1,a2) in the mixed BC:
a1*u(i1,i2,i3,i) + a2*u(i1,i2,i3,i)_n = a0
are stored in
a_j = bcData(i+nc*(j),side,axis,grid), j=0,1,2
Thus bcData(i,side,axis,grid) still holds the RHS value for the mixed-derivative condition

Reimplemented from DomainSolver.

References a0, all, assert(), axis, SurfaceEquationFace::axis, Parameters::axisymmetric, boundaryCondition(), Parameters::checkForFloatingPointErrors, DomainSolver::checkSolution(), cnsFarFieldBC, cnsNoSlipBC, cnsNoSlipWallBC, cnsSlipWallBC, cnsSlipWallBC2, CnsParameters::compressibleMultiphase, CnsParameters::conservativeGodunov, Parameters::dbase, DomainSolver::debug(), dir, dirichlet, dirichletBoundaryCondition, Parameters::dirichletBoundaryCondition, display(), DomainSolver::dt, dx, e, SurfaceEquation::faceList, CnsParameters::farField, ForBoundary, Parameters::getBoundaryData(), getIndex(), Parameters::getKnownSolution(), DomainSolver::getTimeDependentBoundaryConditions(), BoundaryData::getVariableCoefficientBoundaryConditionArray(), SurfaceEquationFace::grid, grid, Parameters::gridIsMoving(), gridType, BoundaryData::hasVariableCoefficientBoundaryCondition(), i1, I1, i2, I2, i3, I3, Ig1, Ig2, Ig3, Parameters::implicit, inflowWithVelocityGiven, CnsParameters::inflowWithVelocityGiven, INOUTFLOWEXP, Parameters::isAxisymmetric(), isRectangular, J1, J2, J3, SurfaceEquation::kThermal, m, maskLocal, mg, mixedCoeff, mixedNormalCoeff, mixedRHS, mu, N(), nc, Parameters::neumannBoundaryCondition, Parameters::noInterface, Parameters::noKnownSolution, normal, noSlipWall, Parameters::noSlipWall, DomainSolver::numberOfComponents(), Parameters::numberOfGhostPointsNeeded(), Parameters::numberOfPredefinedBoundaryConditionTypes, ok, outflow, CnsParameters::outflow, OV_ABORT(), DomainSolver::parameters, printF(), DomainSolver::printP(), DomainSolver::px(), S, SurfaceEquationFace::side, side, slipWall, Parameters::slipWall, Parameters::steadyStateNewton, CnsParameters::subSonicInflow, CnsParameters::subSonicOutflow, CnsParameters::superSonicInflow, CnsParameters::superSonicOutflow, surfaceEquation, symmetry, Parameters::symmetry, tc, Parameters::tractionInterface, DomainSolver::twilightZoneFlow(), u, uc, ue, uex, uey, uLocal, ur, ux, uy, uz, V, BoundaryData::variableCoefficientTemperatureBC, vc, wc, and x.

int Cgcns::applyBoundaryConditionsForImplicitTimeStepping ( realMappedGridFunction &  rhs,
realMappedGridFunction &  uL,
realMappedGridFunction &  gridVelocity,
real  t,
int  scalarSystem,
int  grid 
)
virtual
void Cgcns::assignTestProblem ( GridFunction cgf)
virtual
void Cgcns::buildImplicitSolvers ( CompositeGrid &  cg)
virtual

Allocate the appropriate number of implicit solvers (Oges objects)

Parameters
cg(input) :

Reimplemented from DomainSolver.

References Parameters::dbase, grid, DomainSolver::implicitSolver, Parameters::isAxisymmetric(), n, Parameters::noTurbulenceModel, DomainSolver::numberOfImplicitSolvers, DomainSolver::parameters, and printF().

Referenced by setupGridFunctions().

int Cgcns::buildTimeSteppingDialog ( DialogData &  dialog)
virtual

Build the dialog that shows the various options for time stepping.

Parameters
dialog(input) :

Reimplemented from DomainSolver.

References assert(), DomainSolver::buildTimeSteppingDialog(), Parameters::dbase, Parameters::numberOfTimeSteppingMethods, and DomainSolver::parameters.

int Cgcns::formImplicitTimeSteppingMatrix ( realMappedGridFunction &  coeff,
const real &  dt0,
int  scalarSystem,
realMappedGridFunction &  uL,
const int &  grid 
)
virtual
void Cgcns::formMatrixForImplicitSolve ( const real &  dt0,
GridFunction cgf1,
GridFunction cgf0 
)
virtual

Form the matrix for implicit time stepping.

Parameters
dt0(input) : time step used to build the implicit matrix.
cgf1(input) : holds the RHS
cgf0(input) : holds the current state of the solution (used for linearization)
Note
This function was once part of implicitSolve. It was broken out to allow the construction of the matrix independently of the actual solve. Basically all the work is done to initialize the implicit time stepping. The implicit method can be optionally used on only some grids. To implement this approach we simply create a sparse matrix that is just the identity matrix on grids that are advanced explicitly but equal to the standard implicit matrix on grids that are advance implicitly:
///  I - \nu \alpha \dt \Delta on implicit grids 
///  I on explicit grids 
///  
If the form of the boundary conditions for the different components of u are the same then we can build a single scalar matrix that can be used to advance each component, one after the other. If the boundary conditions are not of the same form then we build a matrix for a system of equations for the velocity components (u,v,w).

Note that originally cgf1 from implicitSolve was used to get the time, grid, and operators. We are now using whatever is passed in as "u" to this function. The operators should be the same (?) and the time is used in the debug output. What about the grid though? It can change due to AMR (used with implicit?) as well as from the grid velocity.

Reimplemented from DomainSolver.

References addConstraintEquation(), all, assert(), GridFunction::cg, DomainSolver::cg, DomainSolver::coeff, components, Parameters::dbase, DomainSolver::debug(), formImplicitTimeSteppingMatrix(), Parameters::getComponents(), grid, DomainSolver::implicitSolver, isImplicitMatrixSingular(), mg, n, nc, DomainSolver::numberOfComponents(), Parameters::numberOfGhostPointsNeeded(), DomainSolver::parameters, printF(), GridFunction::t, and GridFunction::u.

Referenced by implicitSolve().

realCompositeGridFunction & Cgcns::getAugmentedSolution ( GridFunction gf0,
realCompositeGridFunction &  v 
)
virtual

Return a grid function for plotting and for output that may contain extra variables, such as errors or such as the pressure for the compressible NS.

Parameters
gf0(input) : input grid function.
v(input) : grid function to hold the result, IF extra variables area added.
Returns
a realCompositeGridFunction holding the possibly augmented solution.

Reimplemented from DomainSolver.

References all, assert(), assign(), cc, GridFunction::cg, DomainSolver::cg, CnsParameters::compressibleMultiphase, CnsParameters::compressibleNavierStokes, DomainSolver::current, Parameters::dbase, dimension, ec, DomainSolver::fn, DomainSolver::getAmrErrorFunction(), Parameters::getDerivedFunction(), GridFunction::getGridVelocity(), getIndex(), Parameters::getKnownSolution(), DomainSolver::gf, grid, Parameters::gridIsMoving(), I1, I2, I3, includeGhost, Parameters::isAdaptiveGridProblem(), Parameters::isMovingGridProblem(), isRectangular, mask, maskLocal, mg, N(), n, Parameters::noKnownSolution, DomainSolver::numberOfComponents(), ok, OV_ABORT(), DomainSolver::parameters, pc, residual(), Parameters::steadyStateRungeKutta, GridFunction::t, tc, DomainSolver::twilightZoneFlow(), GridFunction::u, u, u0, uc, uLocal, v, vc, wc, and x.

int Cgcns::getInterfaceDataOptions ( GridFaceDescriptor info,
int &  interfaceDataOptions 
) const
virtual

Return the interface data required for a given type of interface.

Parameters
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
Note
: this function should be over-loaded.

Reimplemented from DomainSolver.

References axis, GridFaceDescriptor::axis, Parameters::dbase, DomainSolver::debug(), GridFaceDescriptor::grid, grid, Parameters::heatFluxInterface, Parameters::heatFluxInterfaceData, OV_ABORT(), DomainSolver::parameters, Parameters::positionInterfaceData, DomainSolver::printP(), side, GridFaceDescriptor::side, Parameters::tractionInterface, Parameters::tractionInterfaceData, and Parameters::velocityInterfaceData.

void Cgcns::getTimeSteppingEigenvalue ( MappedGrid &  mg,
realMappedGridFunction &  u0,
realMappedGridFunction &  gridVelocity,
real &  reLambda,
real &  imLambda,
const int &  grid 
)
virtual

Determine the real and imaginary parts of the eigenvalue for time stepping.

Parameters
mg(input) : grid.
u(input) : current solution.
gridVelocity(input) : grid velocity.
reLambda(output) : real part of the time-stepping eigenvalue.
imLambda(output) : imaginary part of the time-stepping eigenvalue.
grid(input) : grid number.

Reimplemented from DomainSolver.

References assert(), center, cnsdts, CnsParameters::compressibleMultiphase, Parameters::dbase, DomainSolver::debug(), dx, Parameters::getGridIsImplicit(), getIndex(), grid, Parameters::gridIsMoving(), gridType, I1, I2, I3, DomainSolver::imaginaryPartOfEigenvalue, Parameters::isAxisymmetric(), isRectangular, J1, J2, J3, maskLocal, mu, ok, orderOfAccuracy, DomainSolver::p(), DomainSolver::parameters, DomainSolver::pdtVar, printF(), DomainSolver::realPartOfEigenvalue, rx, tc, u, u0, uc, vc, wc, and xab.

int Cgcns::getTimeSteppingOption ( const aString &  answer,
DialogData &  dialog 
)
virtual
int Cgcns::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

Evaluate du/dt for the Navier-Stokes or Euler equations.

This function will call the appropriate lower level fortran kernel to evaluate the discretization of the equations.

Parameters
v(input) : current solution.
gridVelocity(input) : grid velocity (if this is a moving grid problem)
dvdt(output) : du/dt
iparam(input) : integer parameters.
rparam(input) : real parameters.
dvdtImplicit(output): for implicit methods this contains the ...
pmg2(input) : for moving grids this points to a MappedGrid that holds the mask for the new time level. For non-moving grids this points to the same MappedGrid associated with v.
pGridVelocity2(input) : for moving grids only, supply the grid velocity at time t+dt for moving grids.
Author
wdh.

Reimplemented from DomainSolver.

References addForcing(), all, assert(), AVJST2D, axis, Parameters::axisymmetric, Parameters::branching, c, CMFDU, CMPDU, CNSDU22, CNSDU22A, CNSDU23, CnsParameters::compressibleMultiphase, CnsParameters::compressibleNavierStokes, CnsParameters::conservativeGodunov, CnsParameters::conservativeWithArtificialDissipation, d, Parameters::dbase, DomainSolver::debug(), display(), DomainSolver::dt, dudr2comp(), DUDR2D, DUDR2DOLD, DUDR3D, DUDR3DOLD, dx, e, eosUserDefined, getGhostIndex(), getIndex(), gm1, grid, Parameters::gridIsMoving(), i1, I1, i2, I2, i3, I3, ICNSRHS, Parameters::igDesensitization, Parameters::ignitionAndGrowth, DomainSolver::imaginaryPartOfEigenvalue, Parameters::implicit, Parameters::isAxisymmetric(), isRectangular, J1, J2, J3, CnsParameters::jwlEOS, k, m, maskLocal, mg, mr, mu, CnsParameters::multiComponentVersion, CnsParameters::multiFluidVersion, N(), CnsParameters::nonConservative, Parameters::noReactions, DomainSolver::numberOfComponents(), DomainSolver::numberOfStepsTaken, ok, Parameters::oneStep, Parameters::oneStepPress, DomainSolver::outputSolution(), OV_ABORT(), DomainSolver::parameters, printF(), DomainSolver::printP(), R, DomainSolver::realPartOfEigenvalue, rx, Parameters::showfileForcing, side, Parameters::steadyStateNewton, tc, theta, TZCOMMON, U, u, u0, uc, uLocal, ut(), UU, ux, UX, uxx, UXX, UXY, UXZ, UY, uy, UYY, UYZ, UZ, uz, UZZ, v, vc, and wc.

void Cgcns::implicitSolve ( const real &  dt0,
GridFunction cgf1,
GridFunction cgf0 
)
virtual

Solve the implicit time-stepping equations.

Parameters
dt0(input) : time step used to build the implicit matrix.
cgf1(input) : holds the RHS
cgf0(input) : holds the current state of the solution (used for linearization)

Reimplemented from DomainSolver.

References all, assert(), assign(), GridFunction::cg, DomainSolver::coeff, Parameters::dbase, DomainSolver::debug(), display(), DomainSolver::dt, formMatrixForImplicitSolve(), grid, DomainSolver::implicitSolver, n, DomainSolver::numberOfImplicitSolvers, DomainSolver::parameters, printF(), DomainSolver::pvIMS, DomainSolver::pwIMS, GridFunction::t, GridFunction::u, and v.

int Cgcns::initializeSolution ( )
virtual
virtual int Cgcns::interfaceRightHandSide ( InterfaceOptionsEnum  option,
int  interfaceDataOptions,
GridFaceDescriptor info,
GridFaceDescriptor gfd,
int  gfIndex,
real  t 
)
virtual

Reimplemented from DomainSolver.

bool Cgcns::isImplicitMatrixSingular ( realCompositeGridFunction &  uL)
virtual

Return true if the implicit time-stepping matrix is singular.

Parameters
uL(input) : holds the linearized solution.

Reimplemented from DomainSolver.

References a, DomainSolver::cg, CnsParameters::compressibleNavierStokes, Parameters::dbase, grid, Parameters::interpolation, mg, Parameters::noSlipWall, DomainSolver::parameters, s, Parameters::slipWall, and Parameters::steadyStateNewton.

Referenced by formMatrixForImplicitSolve().

void Cgcns::printTimeStepInfo ( const int &  step,
const real &  t,
const real &  cpuTime 
)
virtual
int Cgcns::project ( GridFunction cgf)
virtual

Project the initial conditions of a steady state newton solver on the linear solution.

Parameters
cgf(input) : project this grid function.
Author
kkc.

Reimplemented from DomainSolver.

References DomainSolver::advanceNewton(), DomainSolver::cg, DomainSolver::current, Parameters::dbase, DomainSolver::debug(), DomainSolver::dt, DomainSolver::gf, init, DomainSolver::outputSolution(), DomainSolver::parameters, printF(), s, Parameters::steadyStateNewton, GridFunction::u, and updateToMatchGrid().

void Cgcns::saveShowFileComments ( Ogshow &  show)
virtual

Save comments to the show file that will appear as the top label when viewed with plotStuff.

Parameters
show(input) : show file to use.

Reimplemented from DomainSolver.

References CnsParameters::compressibleMultiphase, CnsParameters::compressibleNavierStokes, CnsParameters::conservativeGodunov, Parameters::dbase, i, mu, and DomainSolver::parameters.

int Cgcns::setPlotTitle ( const real &  t,
const real &  dt 
)
virtual
int Cgcns::setupGridFunctions ( )
virtual
*brief Setup the PDE to be solved *param reactionName name of the reaction *param restartChosen true if this is a restart *param originalBoundaryCondition *author wdh **int Cgcns::setupPde ( aString &  reactionName,
bool  restartChosen,
IntegerArray &  originalBoundaryCondition 
)
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.

Parameters
reactionName(input) :
restartChosen(input) :
originalBoundaryCondition(input) :

Reimplemented from DomainSolver.

References assert(), Parameters::branching, DomainSolver::cg, Parameters::chemkinReaction, CnsParameters::compressibleMultiphase, CnsParameters::compressibleNavierStokes, CnsParameters::conservativeGodunov, CnsParameters::conservativeWithArtificialDissipation, DomainSolver::current, Parameters::dbase, equationDomainList, CnsParameters::fortranVersion, Parameters::forwardEuler, DomainSolver::getName(), DomainSolver::getOriginalBoundaryConditions(), DomainSolver::gf, grid, ListOfEquationDomains::gridDomainNumberList, i, CnsParameters::idealGasEOS, Parameters::igDesensitization, Parameters::ignitionAndGrowth, Parameters::ignitionPressureReactionRate, Parameters::implicit, Parameters::interpolatePrimitiveAndPressure, CnsParameters::jwlEOS, CnsParameters::mieGruneisenEOS, CnsParameters::multiComponentVersion, CnsParameters::multiFluidVersion, DomainSolver::name, CnsParameters::nonConservative, Parameters::oneEquationMixtureFraction, Parameters::oneStep, Parameters::oneStepPress, DomainSolver::parameters, Parameters::pdeName, DomainSolver::pdeName, printF(), DomainSolver::readRestartFile(), Parameters::steadyStateNewton, CnsParameters::stiffenedGasEOS, CnsParameters::taitEOS, Parameters::trapezoidal, Parameters::twoEquationMixtureFractionAndExtentOfReaction, GridFunction::u, u, update(), SurfaceEquation::update(), Parameters::updateUserDefinedEOS(), and CnsParameters::userDefinedEOS.

int Cgcns::updateGeometryArrays ( GridFunction cgf)
virtual
int Cgcns::updateStateVariables ( GridFunction cgf,
int  stage = -1 
)
virtual

Ths function is used to update state-variables. For example, the visco plastic viscosity.

Parameters
cgf(input/output)
stage(input) : -1, 0 or 1

If stage equals -1 then update state variables at all points.

This function is used at two different stages for each time step. In the first stage, (stage=0) the function is called after the solution has been advanced (but before boundary conditions have been applied) to update any equilibrium state variables (and to limit any reacting species variables). Update all points of state variables that may be needed to apply the boundary conditions.

In the second stage, (stage=1) the function is called after the boundary conditions have been applied. Make sure that the state variables have been updated at all points after this step.

Reimplemented from DomainSolver.

References GridFunction::cg, DomainSolver::cg, CnsParameters::compressibleNavierStokes, CnsParameters::conservativeGodunov, Parameters::dbase, DomainSolver::debug(), GridFunction::form, getIndex(), grid, I1, I2, I3, Parameters::igDesensitization, CnsParameters::jwlEOS, mask, mg, CnsParameters::multiComponentVersion, CnsParameters::multiFluidVersion, ok, DomainSolver::parameters, GridFunction::primitiveVariables, printF(), SETEOS, GridFunction::t, GridFunction::u, and u.

int Cgcns::updateToMatchGrid ( CompositeGrid &  cg)
virtual

Update the solver to match a new grid.

Parameters
cg(input): composite grid.

Reimplemented from DomainSolver.

References DomainSolver::imaginaryPartOfEigenvalue, DomainSolver::realPartOfEigenvalue, and DomainSolver::updateToMatchGrid().

Referenced by project().

void Cgcns::writeParameterSummary ( FILE *  file)
virtual

The documentation for this class was generated from the following files: