Download elsA Design and Implementation Tutorial
Transcript
Ref.: /ELSA/MDEV-06001 Version.Edition : 1.0 Date : Jan 10, 2006 Page : 44 / 75 elsA Design and Implementation Tutorial DSNA OPER COMPONENT 9. Operator classes are dedicated to the computation of space discretization terms. Every operator has to compute a FldFieldF object defined upon a specific geometric entity (cell or interface). This chapter is dedicated to all operators in elsA: • Oper: Abstract classes; • Fxc: Convective fluxes (centered scheme, upwind schemes and artificial dissipation); • Fxd: Diffusive fluxes (laminar, mean flow or turbulent); • Sou: Source terms (turbulence closure relations, moving frame, dual time stepping method). 9.1 Oper Module 9.1.1 OperBase abstract class The general operator mechanism is defined inside OperBase class. Important attributes of OperBase are: • _geoEntity: type of geometric entity where the computation has to be carried out; • _borderDepth: width of the "border" region. The numerical treatment of an operator is performed on all cells or interfaces, using the same numerical scheme on all geometric entities. The "interior" region of the operator is the set of the geometric entities where this "current entity" treatment is directly correct. The "border" region is the set of geometric entities where a numerical adaptation (correction) has to be made because of the boundary neighborhood. • _elemSysOper: identifier of the system of equations. The other attributes of this abstract class are pointers: • EosSysEq∗ _sysEq: current description of the problem; • EosIdealGas∗ _eos: current equation of state; • GeoGridBase∗ _grid: current working computational grid. An operator has to work on different contexts (different grids, thermodynamic model, ...), so an Oper object cannot be fully configured at construction time. Instead, when context changes, it must be re-initialized in such a way that it can work correctly. This is precisely the job of OperBase::prepare(), whose signature is: virtual void prepare(const EosSysEq&, EosElemSysType, EosIdealGas* eos, const GeoGridBase* grid); The method implementation is very simple: it reduces to proper (re-)settings of the class pointer attributes. We must clearly distinguish two different operator subtypes, both inheriting from OperBase class: • OperTerm is responsible for the computation of one ’right hand side’ term; • Utility operators are used to perform auxiliary computations; they are usually called by OperTerm objects. Up to now, only two gradient operators have been implemented: OperGrad and OperGradInt.