COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Data.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2013 von Karman Institute for Fluid Dynamics, Belgium
2 //
3 // This software is distributed under the terms of the
4 // GNU Lesser General Public License version 3 (LGPLv3).
5 // See doc/lgpl.txt and doc/gpl.txt for the license text.
6 
7 #include "cf3/math/Defs.hpp"
9 
10 namespace cf3 {
11 namespace physics {
12 namespace lineuler {
13 namespace lineuler2d {
14 
16 
18 {
19  // cons: rho, rho0 U, p
20  cons = _cons;
21  rho=cons[0];
22  U[XX]=cons[1]/rho0;
23  U[YY]=cons[2]/rho0;
24  p=cons[3];
25  U2=U.norm();
26 }
27 
29 {
30  // prim: rho, U, p
31  rho=prim[0];
32  U[XX]=prim[1];
33  U[YY]=prim[2];
34  p=prim[3];
35  U2=U.norm();
36  cons[0]=rho;
37  cons[1]=rho0*U[XX];
38  cons[2]=rho0*U[YY];
39  cons[3]=p;
40 }
41 
43 
44 } // lineuler2d
45 } // lineuler
46 } // physics
47 } // cf3
MatrixTypes< NDIM, NEQS >::RowVector_NEQS RowVector_NEQS
Definition: Types.hpp:22
void compute_from_primitive(const RowVector_NEQS &prim)
Compute the data given primitive state.
Definition: Data.cpp:28
Definition: Defs.hpp:17
void compute_from_conservative(const RowVector_NEQS &cons)
Compute the data given conservative state.
Definition: Data.cpp:17
Top-level namespace for coolfluid.
Definition: Action.cpp:18
ColVector_NDIM U
velocity
Definition: Data.hpp:45
Definition: Defs.hpp:17
Send comments to:
COOLFluiD Web Admin