ODT
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
micromixer Class Reference

Class implementing micromixer object. More...

#include <micromixer.h>

Public Member Functions

virtual void advanceOdt (const double p_tstart, const double p_tend, const int iLevel=-1)
 
void check_balance (int io)
 
 micromixer ()
 
void init (domain *p_domn)
 
virtual ~micromixer ()
 

Public Attributes

domaindomn
 pointer to domain object
 
cvodeDrivercvode
 pointer to cvode driver object for implicit ODE integration (stiff)
 
double tstart
 
double time
 current time
 
double tend
 
double dtStepNominal
 nominal step size
 
double dt
 actual step size (shortened based on output or tend)
 
vector< double > dxc
 abs(\Delta(x^c))
 
vector< double > dx
 abs(\Delta(x))
 
vector< double > gf
 grid factor for derivatives: (df/dx) = gf * (f - f)
 
bool LdoDump
 
vector< double > uDL_1
 for DL instability: old velocity
 
vector< double > uDL_2
 for DL instability: new velocity
 
vector< double > xDL_1
 for DL instability: = "old" cell center positions
 
vector< double > xDL_2
 for DL instability: = "new" cell center positions
 
vector< double > posDL_old
 for DL instability: = "new" cell center positions
 
vector< double > oldrho_or_rhov
 store the old density for continuity
 
int nsteps
 total number of timesteps taken during simulation
 

Protected Member Functions

virtual void setGf ()
 sets the gf array
 
virtual void setGridDxcDx ()
 sets the dxc array
 
virtual void set_oldrho_or_rhov ()
 record old rho (or rho*u) for continuity
 
virtual bool adaptGridIfNeeded ()
 expansion or contraction --> adapt
 
virtual void setNominalStepSize ()
 sets a nominal dt for the whole period
 
void setStepSize ()
 set a local dt for interruptions (dump or tend)
 
void updateGrid ()
 enforce the continuity condition: (e.g., rho*dx = const).
 
void do_DL (string doWhat)
 
void advanceOdtSingleStep_Explicit ()
 
void advanceOdtSingleStep_SemiImplicit ()
 
void advanceOdtSingleStep_StrangSplit ()
 

Protected Attributes

bool LforceSetNominalStepSize
 used in updateGrid when splitting cells to indicate to reset timestep size later
 

Detailed Description

Class implementing micromixer object.

Author
David O. Lignell

Definition at line 23 of file micromixer.h.

Constructor & Destructor Documentation

◆ micromixer()

micromixer::micromixer ( )

micromixer constructor function

Definition at line 19 of file micromixer.cc.

◆ ~micromixer()

virtual micromixer::~micromixer ( )
inlinevirtual

Definition at line 87 of file micromixer.h.

Member Function Documentation

◆ adaptGridIfNeeded()

bool micromixer::adaptGridIfNeeded ( )
protectedvirtual

expansion or contraction --> adapt

Adapt during diffusion for spatial cases for which grid contraction results in small grid cells

Definition at line 381 of file micromixer.cc.

◆ advanceOdt()

void micromixer::advanceOdt ( const double p_tstart,
const double p_tend,
const int iLevel = -1 )
virtual

Advance ODT solution: diffusion and reaction

Definition at line 41 of file micromixer.cc.

◆ advanceOdtSingleStep_Explicit()

void micromixer::advanceOdtSingleStep_Explicit ( )
protected

Advance ODT solution: diffusion and reaction

Definition at line 137 of file micromixer.cc.

◆ advanceOdtSingleStep_SemiImplicit()

void micromixer::advanceOdtSingleStep_SemiImplicit ( )
protected

Advance ODT solution: diffusion and reaction; Some terms are implicit, others explicit. Nominally the mixing terms are explicit. Calling the cvode driver. First order. dphi/dt = D(phi_0) + S(phi) : solving from t0 to t1. Here, D() is the diffusive term, and S() is the (stiff) source term. We solve the whole RHS implicitly, but the D(phi_0) is fixed at time 0.

Definition at line 176 of file micromixer.cc.

◆ advanceOdtSingleStep_StrangSplit()

void micromixer::advanceOdtSingleStep_StrangSplit ( )
protected

Advance ODT solution: diffusion and reaction; Some terms are implicit, others explicit. Nominally the mixing terms are explicit. Calling the cvode driver. First order. dphi/dt = D(phi_0) + S(phi) : solving from t0 to t1. Here, D() is the diffusive term, and S() is the (stiff) source term. We solve the whole RHS implicitly, but the D(phi_0) is fixed at time 0.

Definition at line 218 of file micromixer.cc.

◆ check_balance()

void micromixer::check_balance ( int io)

Definition at line 465 of file micromixer.cc.

◆ do_DL()

void micromixer::do_DL ( string doWhat)
protected

Processes the DL instability

Parameters
doWhatinput: string that indicates what to do.

Definition at line 398 of file micromixer.cc.

◆ init()

void micromixer::init ( domain * p_domn)

micromixer initialization function

Parameters
p_domninput: set domain pointer with.

Definition at line 30 of file micromixer.cc.

◆ set_oldrho_or_rhov()

void micromixer::set_oldrho_or_rhov ( )
protectedvirtual

record old rho (or rho*u) for continuity

Store the old density for continuity. This is a function for generality on inheritance.

Definition at line 459 of file micromixer.cc.

◆ setGf()

void micromixer::setGf ( )
protectedvirtual

sets the gf array

Set the grid factor array

Definition at line 289 of file micromixer.cc.

◆ setGridDxcDx()

void micromixer::setGridDxcDx ( )
protectedvirtual

sets the dxc array

Set the cell sizes vectors: dxc and dx

Definition at line 71 of file micromixer.cc.

◆ setNominalStepSize()

void micromixer::setNominalStepSize ( )
protectedvirtual

sets a nominal dt for the whole period

Set time step size. This is based on a diffusive (or other) timescale. This is a uniform step size for the given integration period. The actual step size will be rest based on a data dump or tend.

Definition at line 85 of file micromixer.cc.

◆ setStepSize()

void micromixer::setStepSize ( )
protected

set a local dt for interruptions (dump or tend)

Set time step size. This is based on a diffusive (or other) timescale. This is a uniform step size for the given integration period. The actual step size will be rest based on a data dump or tend.

Definition at line 118 of file micromixer.cc.

◆ updateGrid()

void micromixer::updateGrid ( )
protected

enforce the continuity condition: (e.g., rho*dx = const).

Update grid for gas expansion

Definition at line 309 of file micromixer.cc.

Member Data Documentation

◆ cvode

cvodeDriver* micromixer::cvode

pointer to cvode driver object for implicit ODE integration (stiff)

Definition at line 30 of file micromixer.h.

◆ domn

domain* micromixer::domn

pointer to domain object

Definition at line 29 of file micromixer.h.

◆ dt

double micromixer::dt

actual step size (shortened based on output or tend)

Definition at line 36 of file micromixer.h.

◆ dtStepNominal

double micromixer::dtStepNominal

nominal step size

Definition at line 35 of file micromixer.h.

◆ dx

vector<double> micromixer::dx

abs(\Delta(x))

Definition at line 39 of file micromixer.h.

◆ dxc

vector<double> micromixer::dxc

abs(\Delta(x^c))

Definition at line 38 of file micromixer.h.

◆ gf

vector<double> micromixer::gf

grid factor for derivatives: (df/dx) = gf * (f - f)

Definition at line 40 of file micromixer.h.

◆ LdoDump

bool micromixer::LdoDump

Definition at line 42 of file micromixer.h.

◆ LforceSetNominalStepSize

bool micromixer::LforceSetNominalStepSize
protected

used in updateGrid when splitting cells to indicate to reset timestep size later

Definition at line 76 of file micromixer.h.

◆ nsteps

int micromixer::nsteps

total number of timesteps taken during simulation

Definition at line 52 of file micromixer.h.

◆ oldrho_or_rhov

vector<double> micromixer::oldrho_or_rhov

store the old density for continuity

Definition at line 50 of file micromixer.h.

◆ posDL_old

vector<double> micromixer::posDL_old

for DL instability: = "new" cell center positions

Definition at line 48 of file micromixer.h.

◆ tend

double micromixer::tend

Definition at line 34 of file micromixer.h.

◆ time

double micromixer::time

current time

Definition at line 33 of file micromixer.h.

◆ tstart

double micromixer::tstart

Definition at line 32 of file micromixer.h.

◆ uDL_1

vector<double> micromixer::uDL_1

for DL instability: old velocity

Definition at line 44 of file micromixer.h.

◆ uDL_2

vector<double> micromixer::uDL_2

for DL instability: new velocity

Definition at line 45 of file micromixer.h.

◆ xDL_1

vector<double> micromixer::xDL_1

for DL instability: = "old" cell center positions

Definition at line 46 of file micromixer.h.

◆ xDL_2

vector<double> micromixer::xDL_2

for DL instability: = "new" cell center positions

Definition at line 47 of file micromixer.h.


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