CG  Version 25
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PistonMotion Class Reference

#include <PistonMotion.h>

Public Types

enum  PistonOptionsEnum { specifiedPistonMotion =0, pressureDrivenPistonMotion, pressureAndBodyForcedPistonMotion }
 

Public Member Functions

 PistonMotion ()
 
 ~PistonMotion ()
 
 PistonMotion (const PistonMotion &x)
 copy constructor
 
real getPosition (const real t) const
 Return the piston position.
 
real getVelocity (const real t) const
 Return the piston velocity.
 
int getFlow (const real t, const real x, real &rhoTrue, real &uTrue, real &pTrue) const
 Compute the fluid solution at a point (t,x)
 
int getPiston (const real t, real &g, real &gt) const
 Get the piston position and velocity.
 
int update (GenericGraphicsInterface &gi)
 Define the piston motion parameters.
 

Protected Member Functions

int computePistonMotion ()
 Solve the ODEs for the piston position and velocity and save as a Nurbs.
 
int dirkImplicitSolve (const real dt, const real aii, const real tc, const RealArray &yv, const RealArray &yv0, RealArray &kv)
 : Solve the implicit DIRK equation for kv. This is a protected routine.
 
void setGlobalConstants () const
 
int timeStep (RealArray &yNew, RealArray &y, real t, real dt)
 Solve the ODEs for the piston position and velocity.
 

Protected Attributes

PistonOptionsEnum pistonOption
 
real mass
 
real rho0
 
real u0
 
real p0
 
real gamma
 
real a0
 
real bf [4]
 
real area
 
real rtol
 
real newtonTol
 
int orderOfAccuracy
 
int debug
 
real dt0
 
real cfl
 
real tFinal
 
real ag
 
real pg
 
NurbsMapping * nurbs
 

Member Enumeration Documentation

Enumerator
specifiedPistonMotion 
pressureDrivenPistonMotion 
pressureAndBodyForcedPistonMotion 

Constructor & Destructor Documentation

PistonMotion::PistonMotion ( )
PistonMotion::~PistonMotion ( )

References nurbs.

PistonMotion::PistonMotion ( const PistonMotion x)

Member Function Documentation

int PistonMotion::computePistonMotion ( )
protected

Solve the ODEs for the piston position and velocity and save as a Nurbs.

References assert(), cfl, dt0, i, nurbs, orderOfAccuracy, pistonOption, pressureAndBodyForcedPistonMotion, printF(), R, rtol, ta, tFinal, and timeStep().

Referenced by update().

int PistonMotion::dirkImplicitSolve ( const real  dt,
const real  aii,
const real  tc,
const RealArray &  yv,
const RealArray &  yv0,
RealArray &  kv 
)
protected

: Solve the implicit DIRK equation for kv. This is a protected routine.

This code is based on the matlab code in ??

References a0, area, bf, debug, gamma, k, mass, newtonTol, orderOfAccuracy, p0, and printF().

Referenced by timeStep().

int PistonMotion::getFlow ( const real  t,
const real  x,
real &  rhoTrue,
real &  uTrue,
real &  pTrue 
) const
int PistonMotion::getPiston ( const real  t,
real &  g,
real &  gt 
) const

Get the piston position and velocity.

References ag, G_FORCED_PISTON, GT_FORCED_PISTON, nurbs, OV_ABORT(), pg, pistonOption, pressureDrivenPistonMotion, printF(), ra, specifiedPistonMotion, and tFinal.

Referenced by getFlow(), and update().

real PistonMotion::getPosition ( const real  t) const
real PistonMotion::getVelocity ( const real  t) const
void PistonMotion::setGlobalConstants ( ) const
protected

References a0, area, gamma, mass, and p0.

Referenced by getFlow(), PistonMotion(), and update().

int PistonMotion::timeStep ( RealArray &  yNew,
RealArray &  y,
real  t,
real  dt 
)
protected

Solve the ODEs for the piston position and velocity.

References a11, c1, c2, ci, dirkImplicitSolve(), orderOfAccuracy, OV_ABORT(), and R.

Referenced by computePistonMotion().

int PistonMotion::update ( GenericGraphicsInterface &  gi)

Member Data Documentation

real PistonMotion::a0
protected
real PistonMotion::ag
protected
real PistonMotion::area
protected
real PistonMotion::bf[4]
protected
real PistonMotion::cfl
protected
int PistonMotion::debug
protected
real PistonMotion::dt0
protected
real PistonMotion::gamma
protected
real PistonMotion::mass
protected
real PistonMotion::newtonTol
protected
NurbsMapping* PistonMotion::nurbs
protected
int PistonMotion::orderOfAccuracy
protected
real PistonMotion::p0
protected
real PistonMotion::pg
protected
PistonOptionsEnum PistonMotion::pistonOption
protected
real PistonMotion::rho0
protected

Referenced by getFlow(), PistonMotion(), and update().

real PistonMotion::rtol
protected
real PistonMotion::tFinal
protected
real PistonMotion::u0
protected

Referenced by PistonMotion().


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