org.jscience.physics.fluids.dynamics.mesh
Class NavierStokesMesh

java.lang.Object
  extended by org.jscience.physics.fluids.dynamics.mesh.NavierStokesMesh

public class NavierStokesMesh
extends java.lang.Object

Load, storage and manipulation of meshses for Navier-Stokes. The ideal solution would be to unify this class and the Mesh class (lineal) in one which implements an interface.

This class loads a mesh with triangular quadratic elements and from there, composes the lineal mesh of pressures.


Field Summary
protected  double[][] coordl
          Vector with the coordinates of the linear nodes.
protected  double[][] coordq
          Vector with the coordinates of the quadratic nodes.
 int[] l1Slip
          List of quadratic nodes L1 in the slip contour.
 int[] l2Slip
          List of quadratic nodes L2 in the slip contour.
 double[] lengthSlip
          List of lengths of the segments in the slip contour.
 int[] lq
          Array of conversion of linear to quadratic.
 int[] nDirichletl
          DOCUMENT ME!
 int[] nDirichletq
          DOCUMENT ME!
 int[] nDragLiftl
          DOCUMENT ME!
 int[] nDragLiftq
          DOCUMENT ME!
 int[] nNeumannl
          DOCUMENT ME!
 int[] nNeumannq
          DOCUMENT ME!
protected  int[][] nodesl
          Vector con the linear nodes that form a given element.
protected  int[][] nodesq
          Vector con the quadratic nodes that form a given element.
 int[] nPerfilDirichletq
          DOCUMENT ME!
 int[] nSlipl
          DOCUMENT ME!
 int[] nSlipq
          DOCUMENT ME!
 double[] nxSlip
          Component list X of the normal in the slip contour.
 double[] nySlip
          Component list Y of the normal in the slip contour.
 int[] ql
          Array of conversion of quadratic to lineal.
 int[] qSlip
          List of quadratic nodes Q in the slip contour.
 double[][] vDirichletl
          DOCUMENT ME!
 double[][] vDirichletq
          DOCUMENT ME!
 double[] vNeumannl
          DOCUMENT ME!
 double[] vNeumannq
          DOCUMENT ME!
 
Constructor Summary
NavierStokesMesh(KernelADFC kadfc)
          Constructor.
 
Method Summary
 double[] calculateInterpolatedField(double[] quadField, double[] linealField)
          interpolate a lineal field to a quadratic one.
 int containingElement(double x0, double y0)
          Returns the element that contains the given point.
 int[] elementReferencesNode()
          DOCUMENT ME!
 int[] elementReferencesNodeQuad()
          DOCUMENT ME!
 double evaluateIntegral(double[] par)
          DOCUMENT ME!
 double evaluateIntegralLinealProduct(double[] a, double[] b)
          DOCUMENT ME!
 int[] getCacheNodeLinealElement()
          DOCUMENT ME!
 double[][] getCoordinates()
          Returns the lineal coordinates.
 double[] getCoordinates(int iesima)
          Returns the lineal coordinates i-esimas (0=x, 1=y, 2=z,...)
 double[][] getCoordinatesQuad()
          Returns the coordinates quadratics.
 double[] getCoordinatesQuad(int iesima)
          Returns the quadratic coordinates i-esimas (0=x, 1=y, 2=z,...)
 double[][] getDirichletValues()
          Returns values of the contour conditions of the nodes Dirichlet.
 double[] getElementAverageSizes()
          Returns the average sizes of the elements.
 int[] getIpos()
          Returns the vector Ipos lineal (NVPN)
 int[] getIposQuad()
          Returns the vector Ipos quadratic (NVPN)
 int[] getJpos()
          Returns the vector Jpos lineal (NNVI)
 int[] getJposQuad()
          Returns the vector Jpos quadratic (NNVI)
 Matrix getMassMatrix()
          returns the mass matrix of the associated lineal mesh.
 Matrix getMassMatrixQuad()
          DOCUMENT ME!
 Matrix getMatrixDerivadaXQuad()
          DOCUMENT ME!
 Matrix getMatrixDerivadaYQuad()
          DOCUMENT ME!
 Matrix getMatrixDivergenceX()
          DOCUMENT ME!
 Matrix getMatrixDivergenceXQuad()
          DOCUMENT ME!
 Matrix getMatrixDivergenceY()
          DOCUMENT ME!
 Matrix getMatrixDivergenceYQuad()
          DOCUMENT ME!
 Matrix getMatrixDivergenceZ()
          DOCUMENT ME!
 Matrix getMatrixDivergenceZQuad()
          DOCUMENT ME!
 double[] getNeumannValues()
          Returns the values of the contour conditions of the nodes Neumann.
 int[] getNodes(int iesima)
          Returns the linear nodes i-esimos (0=1st, 1=2nd, 3=3rd,...)
 int[] getNodesDirichlet()
          Returns the indexes of the nodes Dirichlet
 int[] getNodesDirichletQuad()
          Returns the indexes of the Dirichlet quadratic nodes !
 int[] getNodesDragLift()
          DOCUMENT ME!
 int[] getNodesDragLiftQuad()
          DOCUMENT ME!
 int[] getNodesNeumann()
          Returns the indexes of the nodes Neumann
 int[] getNodesNeumannQuad()
          Returns the indexes of the quadratic nodes Neumann!
 int[] getNodesPerfilDirichletQuad()
          DOCUMENT ME!
 int[][] getNodesQuad()
          DOCUMENT ME!
 int[] getNodesQuad(int iesima)
          Returns the linear nodes i-esimos (0=1st, 1=2nd, 3=3rd,...)
 int[] getNodesSlip()
          DOCUMENT ME!
 int[][] getNodeVector()
          Returns the vector of all the linear nodes.
 Matrix getRigidityMatrix()
          DOCUMENT ME!
 Matrix getRigidityMatrixQuad()
          DOCUMENT ME!
 int[] getStartCacheNodeLinealElement()
          DOCUMENT ME!
 double[][] getValuesDirichletQuad()
          Returns the values of the contour conditions of the nodes Dirichlet.
 double[] getValuesNeumannQuad()
          Returns the values of the contour conditions of the nodes Neumann.
 double[][] getVectorCoordinates()
          Returns the vector of todas the coordinates lineals.
 double[][] getVectorCoordinatesQuad()
          Returns the vector of todas the coordinates quadratics.
 int[][] getVectorNodesQuad()
          Returns the vector of all the quadratic nodes.
 boolean is3D()
          DOCUMENT ME!
 boolean isCilindroDragLift()
          DOCUMENT ME!
 int[] linealFromQuadratics(int[] quadratics)
          Returns the translation a lineal of the given quadratic nodes. if there is no equivalence for some one, it is omited.
 int[] quadraticFromLineal(int[] lineals)
          Returns the conversion to a quadratic of the given linear nodes.
 double valueFieldQuad(double xco, double yco, double[] field)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodesq

protected int[][] nodesq
Vector con the quadratic nodes that form a given element.


nodesl

protected int[][] nodesl
Vector con the linear nodes that form a given element.


coordq

protected double[][] coordq
Vector with the coordinates of the quadratic nodes.


coordl

protected double[][] coordl
Vector with the coordinates of the linear nodes.


lq

public int[] lq
Array of conversion of linear to quadratic.

Lineal = lq[Cuad];


ql

public int[] ql
Array of conversion of quadratic to lineal.

Cuad = ql[Lineal];


nDirichletq

public int[] nDirichletq
DOCUMENT ME!


nNeumannq

public int[] nNeumannq
DOCUMENT ME!


nDirichletl

public int[] nDirichletl
DOCUMENT ME!


nNeumannl

public int[] nNeumannl
DOCUMENT ME!


vNeumannq

public double[] vNeumannq
DOCUMENT ME!


vNeumannl

public double[] vNeumannl
DOCUMENT ME!


vDirichletq

public double[][] vDirichletq
DOCUMENT ME!


vDirichletl

public double[][] vDirichletl
DOCUMENT ME!


nDragLiftq

public int[] nDragLiftq
DOCUMENT ME!


nDragLiftl

public int[] nDragLiftl
DOCUMENT ME!


nPerfilDirichletq

public int[] nPerfilDirichletq
DOCUMENT ME!


nSlipq

public int[] nSlipq
DOCUMENT ME!


nSlipl

public int[] nSlipl
DOCUMENT ME!


nxSlip

public double[] nxSlip
Component list X of the normal in the slip contour.


nySlip

public double[] nySlip
Component list Y of the normal in the slip contour.


lengthSlip

public double[] lengthSlip
List of lengths of the segments in the slip contour.


l1Slip

public int[] l1Slip
List of quadratic nodes L1 in the slip contour.


l2Slip

public int[] l2Slip
List of quadratic nodes L2 in the slip contour.


qSlip

public int[] qSlip
List of quadratic nodes Q in the slip contour.

Constructor Detail

NavierStokesMesh

public NavierStokesMesh(KernelADFC kadfc)
Constructor.

Parameters:
kadfc - DOCUMENT ME!
Method Detail

calculateInterpolatedField

public double[] calculateInterpolatedField(double[] quadField,
                                           double[] linealField)
interpolate a lineal field to a quadratic one.

Parameters:
quadField -
linealField -
Returns:
quadratic field interpolated in omega

quadraticFromLineal

public int[] quadraticFromLineal(int[] lineals)
Returns the conversion to a quadratic of the given linear nodes.

Parameters:
lineals - DOCUMENT ME!
Returns:
DOCUMENT ME!

containingElement

public int containingElement(double x0,
                             double y0)
Returns the element that contains the given point. Uses for that the lineal mesh.

Parameters:
x0 - coordinate x
y0 - coordinate y
Returns:
the index of the element containing it or -1 if nothing found.

elementReferencesNode

public int[] elementReferencesNode()
DOCUMENT ME!

Returns:
DOCUMENT ME!

elementReferencesNodeQuad

public int[] elementReferencesNodeQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getCacheNodeLinealElement

public int[] getCacheNodeLinealElement()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getStartCacheNodeLinealElement

public int[] getStartCacheNodeLinealElement()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getCoordinates

public double[] getCoordinates(int iesima)
Returns the lineal coordinates i-esimas (0=x, 1=y, 2=z,...)

Parameters:
iesima - DOCUMENT ME!
Returns:
matrix of coordinates

getCoordinates

public double[][] getCoordinates()
Returns the lineal coordinates.

Returns:
matrix of coordinates

getCoordinatesQuad

public double[] getCoordinatesQuad(int iesima)
Returns the quadratic coordinates i-esimas (0=x, 1=y, 2=z,...)

Parameters:
iesima - DOCUMENT ME!
Returns:
matrix of quadratic coordinates

getCoordinatesQuad

public double[][] getCoordinatesQuad()
Returns the coordinates quadratics.

Returns:
matrix of coordinates

getIpos

public int[] getIpos()
Returns the vector Ipos lineal (NVPN)

Returns:
DOCUMENT ME!

getIposQuad

public int[] getIposQuad()
Returns the vector Ipos quadratic (NVPN)

Returns:
DOCUMENT ME!

getJpos

public int[] getJpos()
Returns the vector Jpos lineal (NNVI)

Returns:
DOCUMENT ME!

getJposQuad

public int[] getJposQuad()
Returns the vector Jpos quadratic (NNVI)

Returns:
DOCUMENT ME!

getMatrixDivergenceX

public Matrix getMatrixDivergenceX()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMatrixDivergenceY

public Matrix getMatrixDivergenceY()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMatrixDivergenceZ

public Matrix getMatrixDivergenceZ()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMassMatrix

public Matrix getMassMatrix()
returns the mass matrix of the associated lineal mesh. Needed to calculte the divergence.

Returns:
DOCUMENT ME!

getMassMatrixQuad

public Matrix getMassMatrixQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getRigidityMatrix

public Matrix getRigidityMatrix()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getRigidityMatrixQuad

public Matrix getRigidityMatrixQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNodes

public int[] getNodes(int iesima)
Returns the linear nodes i-esimos (0=1st, 1=2nd, 3=3rd,...)

Parameters:
iesima - DOCUMENT ME!
Returns:
matrix of nodes

getNodesQuad

public int[] getNodesQuad(int iesima)
Returns the linear nodes i-esimos (0=1st, 1=2nd, 3=3rd,...)

Parameters:
iesima - DOCUMENT ME!
Returns:
matrix of nodes

getNodesQuad

public int[][] getNodesQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNodesDirichletQuad

public int[] getNodesDirichletQuad()
Returns the indexes of the Dirichlet quadratic nodes !

Returns:
matrix of indexes of nodes Dirichlet

getNodesNeumannQuad

public int[] getNodesNeumannQuad()
Returns the indexes of the quadratic nodes Neumann!

Returns:
matrix of indexes of nodes Neumann

getValuesDirichletQuad

public double[][] getValuesDirichletQuad()
Returns the values of the contour conditions of the nodes Dirichlet.

Returns:
matrix of values Dirichlet

getValuesNeumannQuad

public double[] getValuesNeumannQuad()
Returns the values of the contour conditions of the nodes Neumann.

Returns:
matrix of values Neumann

getVectorCoordinates

public double[][] getVectorCoordinates()
Returns the vector of todas the coordinates lineals.

Returns:
coordinates lineals

getVectorCoordinatesQuad

public double[][] getVectorCoordinatesQuad()
Returns the vector of todas the coordinates quadratics.

Returns:
coordinates quadratics

getNodeVector

public int[][] getNodeVector()
Returns the vector of all the linear nodes.

Returns:
lineal nodes

getVectorNodesQuad

public int[][] getVectorNodesQuad()
Returns the vector of all the quadratic nodes.

Returns:
quadratic nodes

linealFromQuadratics

public int[] linealFromQuadratics(int[] quadratics)
Returns the translation a lineal of the given quadratic nodes. if there is no equivalence for some one, it is omited. For that reason, the size of the returned vector is not equal to the quadratics one. It works with several arrays in parallel.

Parameters:
quadratics -
Returns:

getNodesDragLift

public int[] getNodesDragLift()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNodesDragLiftQuad

public int[] getNodesDragLiftQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNodesDirichlet

public int[] getNodesDirichlet()
Returns the indexes of the nodes Dirichlet

Returns:
matrix of indexes of nodes Dirichlet

getNodesNeumann

public int[] getNodesNeumann()
Returns the indexes of the nodes Neumann

Returns:
matrix of indexes of nodes Neumann

getNodesSlip

public int[] getNodesSlip()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNodesPerfilDirichletQuad

public int[] getNodesPerfilDirichletQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMatrixDerivadaXQuad

public Matrix getMatrixDerivadaXQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMatrixDerivadaYQuad

public Matrix getMatrixDerivadaYQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMatrixDivergenceXQuad

public Matrix getMatrixDivergenceXQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMatrixDivergenceYQuad

public Matrix getMatrixDivergenceYQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getMatrixDivergenceZQuad

public Matrix getMatrixDivergenceZQuad()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getElementAverageSizes

public double[] getElementAverageSizes()
Returns the average sizes of the elements.

Returns:
vector of the average sizes of the elements.

getDirichletValues

public double[][] getDirichletValues()
Returns values of the contour conditions of the nodes Dirichlet.

Returns:
matrix of values Dirichlet

getNeumannValues

public double[] getNeumannValues()
Returns the values of the contour conditions of the nodes Neumann.

Returns:
matrix of values neumann

evaluateIntegral

public double evaluateIntegral(double[] par)
DOCUMENT ME!

Parameters:
par -
Returns:

evaluateIntegralLinealProduct

public double evaluateIntegralLinealProduct(double[] a,
                                            double[] b)
DOCUMENT ME!

Parameters:
a -
b -
Returns:

valueFieldQuad

public double valueFieldQuad(double xco,
                             double yco,
                             double[] field)
DOCUMENT ME!

Parameters:
xco -
yco -
field -
Returns:

is3D

public boolean is3D()
DOCUMENT ME!

Returns:
DOCUMENT ME!

isCilindroDragLift

public boolean isCilindroDragLift()
DOCUMENT ME!

Returns:
DOCUMENT ME!