mathcomp.assemble.cfd
Class NavierStokesAssembler

java.lang.Object
  extended by mathcomp.monitor.DefaultReportable
      extended by mathcomp.monitor.DefaultAlgorithm
          extended by mathcomp.assemble.Assembler
              extended by mathcomp.assemble.stokes.StokesAssembler
                  extended by mathcomp.assemble.cfd.NavierStokesAssembler
All Implemented Interfaces:
java.lang.Runnable, Algorithm, Reportable
Direct Known Subclasses:
NSMiniAssembler

public abstract class NavierStokesAssembler
extends mathcomp.assemble.stokes.StokesAssembler


Field Summary
 double alpha
           
 double beta
           
static int BOUNDARY_FRICTION
           
static int BOUNDARY_GLUE
           
static int BOUNDARY_INFLOW
           
static int BOUNDARY_OUTFLOW
           
static int BOUNDARY_SLIP
           
static double INIT_ALPHA
           
static double INIT_BETA
           
static double INIT_DUCT_RADIUS
           
static int INIT_MAXITER
           
static double INIT_STARTTIME
           
static double INIT_STEPTIME
           
static double INIT_STOPTIME
           
static double INIT_TOLERANCE
           
static double INIT_VELOCITY
           
static double INIT_VISCOSITY
           
static int IS_ITERATIVE
           
static int IS_TIMEDEPENDANT
           
static int NO_BOUNDARY
           
 int type
           
 
Fields inherited from class mathcomp.assemble.stokes.StokesAssembler
gaussPoints, gaussWeights
 
Fields inherited from class mathcomp.assemble.Assembler
dirichletBoundaryValues, solScale
 
Constructor Summary
NavierStokesAssembler()
           
 
Method Summary
 Vector addDirichletNodes(Vector sol)
          Completes the solution vector by adding the values at the dirichlet nodes
 void addToM(mathcomp.assemble.stokes.StokesNode u, mathcomp.assemble.stokes.StokesNode v, double d)
          This method was overridden since we don't have Newmann boundary conditions in the Stokes problem
 void addToY(mathcomp.assemble.stokes.StokesNode n, double value)
           
 void assembleGlobal()
          The main assemble method generally called from outside.
 java.util.Map calcDirichletBoundary(java.util.Map boundaryNodes)
          Pre-calculation of the values at the Dirichlet boundary stored in a HashMap that maps to every Dirichlet boundary point its corresponding value by considering the boundary identifier info for this boundary segment.
 java.util.Map calcUnitNormals()
           
 java.util.Map getBoundaryNodes()
           
 Vector getOldSolution()
           
 ParameterBox getParameterBox()
           
 int getType()
           
 boolean isFinalRun()
           
 void setFP_parameters(double alpha, double beta)
           
 void setIterationState(int current, int bound)
           
 void setOldSolution(Vector x, Vector yy)
           
 void setParameterBox(ParameterBox parameterBox)
           
 
Methods inherited from class mathcomp.assemble.stokes.StokesAssembler
createSurfaces, evalApproxGradientU1, evalApproxGradientU2, evalApproxSolution, evalApproxSolutionPressure, evalApproxSolutionU1, evalApproxSolutionU2, evalBasisFuncOnRefPressure, evalBasisFuncOnRefVelocity, evalExactGradientU1, evalExactGradientU2, evalExactSolution, evalExactSolutionPressure, evalExactSolutionU1, evalExactSolutionU2, evalF, evalF1, evalF2, getDirichletValueAt, getErrorCalculator, getPaintNodes, getViscosity, setViscosity
 
Methods inherited from class mathcomp.assemble.Assembler
createDof, createSurfaces, evalApproxGradient, evalExactGradient, getDof, getElementMatrix, getEpsilon, getExactPartialX, getExactPartialY, getGrid, getInfoUrl, getM, getPreferredGridFileName, getSolScale, getY, report, run, setEpsilon, setGrid, setM, setTauIndex, setY, toString
 
Methods inherited from class mathcomp.monitor.DefaultAlgorithm
algoAbortIfNeeded, algoCancel, algoClear, algoCount, algoIncrement, algoMax, isAlgoCancel, setAlgoCount, setAlgoMax
 
Methods inherited from class mathcomp.monitor.DefaultReportable
getReport, setReport
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mathcomp.monitor.Reportable
getReport, setReport
 

Field Detail

BOUNDARY_OUTFLOW

public static final int BOUNDARY_OUTFLOW
See Also:
Constant Field Values

BOUNDARY_INFLOW

public static final int BOUNDARY_INFLOW
See Also:
Constant Field Values

BOUNDARY_GLUE

public static final int BOUNDARY_GLUE
See Also:
Constant Field Values

BOUNDARY_SLIP

public static final int BOUNDARY_SLIP
See Also:
Constant Field Values

NO_BOUNDARY

public static final int NO_BOUNDARY
See Also:
Constant Field Values

BOUNDARY_FRICTION

public static final int BOUNDARY_FRICTION
See Also:
Constant Field Values

alpha

public double alpha

beta

public double beta

INIT_ALPHA

public static double INIT_ALPHA

INIT_BETA

public static double INIT_BETA

IS_ITERATIVE

public static final int IS_ITERATIVE
See Also:
Constant Field Values

IS_TIMEDEPENDANT

public static final int IS_TIMEDEPENDANT
See Also:
Constant Field Values

INIT_VISCOSITY

public static final double INIT_VISCOSITY
See Also:
Constant Field Values

INIT_MAXITER

public static final int INIT_MAXITER
See Also:
Constant Field Values

INIT_TOLERANCE

public static final double INIT_TOLERANCE
See Also:
Constant Field Values

INIT_VELOCITY

public static final double INIT_VELOCITY
See Also:
Constant Field Values

INIT_STARTTIME

public static final double INIT_STARTTIME
See Also:
Constant Field Values

INIT_STEPTIME

public static final double INIT_STEPTIME
See Also:
Constant Field Values

INIT_STOPTIME

public static final double INIT_STOPTIME
See Also:
Constant Field Values

INIT_DUCT_RADIUS

public static final double INIT_DUCT_RADIUS
See Also:
Constant Field Values

type

public int type
Constructor Detail

NavierStokesAssembler

public NavierStokesAssembler()
Method Detail

setIterationState

public void setIterationState(int current,
                              int bound)

isFinalRun

public boolean isFinalRun()
Overrides:
isFinalRun in class mathcomp.assemble.stokes.StokesAssembler

setOldSolution

public void setOldSolution(Vector x,
                           Vector yy)

getOldSolution

public Vector getOldSolution()

assembleGlobal

public void assembleGlobal()
Description copied from class: Assembler
The main assemble method generally called from outside. It once calculates the boundary, the global DOFs and the Dirichlet values. Then Matrix m and right side Vector y are created. Finally an iteration over all elements calls assemble(Grid g, Triangle t, Matrix m) for each element.

Overrides:
assembleGlobal in class mathcomp.assemble.stokes.StokesAssembler

calcDirichletBoundary

public java.util.Map calcDirichletBoundary(java.util.Map boundaryNodes)
Pre-calculation of the values at the Dirichlet boundary stored in a HashMap that maps to every Dirichlet boundary point its corresponding value by considering the boundary identifier info for this boundary segment. This method was overridden in the StokesAssembler class, to be possible to use the objects StokesNode instead of Node.

Overrides:
calcDirichletBoundary in class mathcomp.assemble.stokes.StokesAssembler

addToM

public void addToM(mathcomp.assemble.stokes.StokesNode u,
                   mathcomp.assemble.stokes.StokesNode v,
                   double d)
Description copied from class: mathcomp.assemble.stokes.StokesAssembler
This method was overridden since we don't have Newmann boundary conditions in the Stokes problem

Overrides:
addToM in class mathcomp.assemble.stokes.StokesAssembler

addToY

public void addToY(mathcomp.assemble.stokes.StokesNode n,
                   double value)

addDirichletNodes

public Vector addDirichletNodes(Vector sol)
Description copied from class: Assembler
Completes the solution vector by adding the values at the dirichlet nodes

Overrides:
addDirichletNodes in class Assembler
Parameters:
sol - the calculated solution vector
Returns:
the completed solution vector

calcUnitNormals

public java.util.Map calcUnitNormals()

setParameterBox

public void setParameterBox(ParameterBox parameterBox)
Overrides:
setParameterBox in class mathcomp.assemble.stokes.StokesAssembler

getParameterBox

public ParameterBox getParameterBox()

getType

public int getType()
Overrides:
getType in class mathcomp.assemble.stokes.StokesAssembler

setFP_parameters

public void setFP_parameters(double alpha,
                             double beta)

getBoundaryNodes

public java.util.Map getBoundaryNodes()