COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
plugins
Physics
cf3
physics
lineuler
lineuler2d
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
"
8
#include "
cf3/physics/lineuler/lineuler2d/Data.hpp
"
9
10
namespace
cf3
{
11
namespace
physics
{
12
namespace
lineuler {
13
namespace
lineuler2d {
14
16
17
void
Data::compute_from_conservative
(
const
RowVector_NEQS
& _cons)
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
28
void
Data::compute_from_primitive
(
const
RowVector_NEQS
& prim)
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
cf3::physics::lineuler::lineuler2d::RowVector_NEQS
MatrixTypes< NDIM, NEQS >::RowVector_NEQS RowVector_NEQS
Definition:
Types.hpp:22
atest-boussinesq.physics
tuple physics
Definition:
atest-boussinesq.py:20
cf3::physics::lineuler::lineuler2d::Data::compute_from_primitive
void compute_from_primitive(const RowVector_NEQS &prim)
Compute the data given primitive state.
Definition:
Data.cpp:28
cf3::physics::lineuler::lineuler2d::Data::U2
Real U2
velocity squared
Definition:
Data.hpp:46
cf3::physics::lineuler::lineuler2d::Data::rho0
Real rho0
Definition:
Data.hpp:34
cf3::physics::lineuler::lineuler2d::Data::rho
Real rho
density
Definition:
Data.hpp:44
cf3::XX
Definition:
Defs.hpp:17
cf3::physics::lineuler::lineuler2d::Data::compute_from_conservative
void compute_from_conservative(const RowVector_NEQS &cons)
Compute the data given conservative state.
Definition:
Data.cpp:17
cf3::physics::lineuler::lineuler2d::Data::p
Real p
pressure
Definition:
Data.hpp:47
cf3::physics::lineuler::lineuler2d::Data::cons
RowVector_NEQS cons
Definition:
Data.hpp:24
cf3
Top-level namespace for coolfluid.
Definition:
Action.cpp:18
cf3::physics::lineuler::lineuler2d::Data::U
ColVector_NDIM U
velocity
Definition:
Data.hpp:45
Defs.hpp
Data.hpp
cf3::YY
Definition:
Defs.hpp:17
Generated on Sun Jun 14 2015 21:20:15 for COOLFluiD by
1.8.9.1
Send comments to:
COOLFluiD Web Admin