13 namespace lineuler2d {
22 u0n = p.
U0.dot(normal);
26 flux[1] = u0n*p.
cons[1] + p.
p*normal[
XX];
27 flux[2] = u0n*p.
cons[2] + p.
p*normal[
YY];
30 wave_speed=std::abs(u0n)+p.
c0;
38 u0n = p.
U0.dot(normal);
42 flux[1] = u0n*p.
cons[1] + p.
p*normal[
XX];
43 flux[2] = u0n*p.
cons[2] + p.
p*normal[
YY];
50 wave_speed=std::abs(p.
U0.dot(normal))+p.
c0;
57 u0n = p.
U0.dot(normal);
68 const Real inv_c0 = 1./p.
c0;
69 const Real& nx = normal[
XX];
70 const Real& ny = normal[
YY];
73 1., 0., 0.5*inv_c0, 0.5*inv_c0,
74 0., ny, 0.5*nx, -0.5*nx,
75 0., -nx, 0.5*ny, -0.5*ny,
76 0., 0., 0.5*p.
c0, 0.5*p.
c0;
82 const Real inv_c0 = 1./p.
c0;
83 const Real& nx = normal[
XX];
84 const Real& ny = normal[
YY];
88 1., 0., 0., -inv_c0*inv_c0,
99 static Real left_wave_speed, right_wave_speed;
103 flux = 0.5*(left_flux+right_flux);
104 flux -= 0.5*wave_speed*(right.
cons - left.
cons);
111 const Real u0n = p.
U0.dot(normal);
112 const Real inv_2c = 0.5/p.
c0;
113 const Real inv_2c2 = 0.5/(p.
c0*p.
c0);
115 const Real& nx = normal[
XX];
116 const Real& ny = normal[
YY];
117 const Real nx2 = nx*nx;
118 const Real ny2 = ny*ny;
119 const Real absu0n = std::abs(u0n);
120 const Real cpu = std::abs(p.
c0+u0n);
121 const Real cmu = std::abs(p.
c0-u0n);
122 const Real plus = cmu + cpu;
123 const Real minus = cpu - cmu;
124 const Real pm2u = plus - 2*absu0n;
126 absolute_flux_jacobian <<
127 absu0n, (nx*minus)*inv_2c, (ny*minus)*inv_2c, pm2u*inv_2c2,
128 0, (2*ny2*absu0n + nx2*plus)*0.5, (nx*ny*pm2u)*0.5, (nx*minus)*inv_2c,
129 0, (nx*ny*pm2u)*0.5, (2*nx2*absu0n + ny2*plus)*0.5, (ny*minus)*inv_2c,
130 0, (p.
c0*nx*minus)*0.5, (p.
c0*ny*minus)*0.5, plus*0.5;
144 flux.noalias() = 0.5*(flux_left+flux_right);
157 const Real& rho = conservative[0];
158 const Real& rho0u = conservative[1];
159 const Real& rho0v = conservative[2];
160 const Real& press = conservative[3];
161 const Real& nx = characteristic_normal[
XX];
162 const Real& ny = characteristic_normal[
YY];
163 Real&
S = characteristic[0];
164 Real& Omega = characteristic[1];
165 Real& Aplus = characteristic[2];
166 Real& Amin = characteristic[3];
168 S = rho - press/(c0*
c0);
169 Omega = ny*rho0u - nx*rho0v;
170 Aplus = nx*rho0u + ny*rho0v + press/
c0;
171 Amin = -nx*rho0u - ny*rho0v + press/
c0;
178 const Real&
S = characteristic[0];
179 const Real& Omega = characteristic[1];
180 const Real& Aplus = characteristic[2];
181 const Real& Amin = characteristic[3];
182 const Real& nx = characteristic_normal[
XX];
183 const Real& ny = characteristic_normal[
YY];
184 Real& rho = conservative[0];
185 Real& rho0u = conservative[1];
186 Real& rho0v = conservative[2];
187 Real& press = conservative[3];
189 const Real A = Aplus+Amin;
190 const Real omega = Aplus-Amin;
193 rho0u = ny*Omega + 0.5*nx*omega;
194 rho0v = -nx*Omega + 0.5*ny*omega;
void cons_to_char(const RowVector_NEQS &conservative, const ColVector_NDIM &characteristic_normal, const Real &c0, RowVector_NEQS &characteristic)
MatrixTypes< NDIM, NEQS >::RowVector_NEQS RowVector_NEQS
boost::proto::terminal< SFOp< NormalOp > >::type const normal
void compute_convective_wave_speed(const Data &p, const ColVector_NDIM &normal, Real &wave_speed)
Maximum absolute wave speed.
void compute_rusanov_flux(const Data &left, const Data &right, const ColVector_NDIM &normal, RowVector_NEQS &flux, Real &wave_speed)
Rusanov Approximate Riemann solver.
void compute_convective_right_eigenvectors(const Data &p, const ColVector_NDIM &normal, Matrix_NEQSxNEQS &right_eigenvectors)
Right eigenvectors projected on a given normal.
MatrixTypes< NDIM, NEQS >::Matrix_NEQSxNEQS Matrix_NEQSxNEQS
MatrixTypes< NDIM, NEQS >::ColVector_NDIM ColVector_NDIM
void compute_cir_flux(const Data &left, const Data &right, const ColVector_NDIM &normal, RowVector_NEQS &flux, Real &wave_speed)
CIR (Courant Isaacson Rees) Flux Splitting Upwind scheme for linear hyperbolic system Riemann solver ...
Real e()
Definition of the Unit charge [C].
boost::proto::terminal< TransposeFunction >::type const transpose
void compute_convective_left_eigenvectors(const Data &p, const ColVector_NDIM &normal, Matrix_NEQSxNEQS &left_eigenvectors)
Left eigenvectors projected on a given normal.
void char_to_cons(const RowVector_NEQS &characteristic, const ColVector_NDIM &characteristic_normal, const Real &c0, RowVector_NEQS &conservative)
Top-level namespace for coolfluid.
void compute_convective_eigenvalues(const Data &p, const ColVector_NDIM &normal, RowVector_NEQS &eigen_values)
Eigenvalues or wave speeds projected on a given normal.
void compute_convective_flux(const Data &p, const ColVector_NDIM &normal, RowVector_NEQS &flux, Real &wave_speed)
Convective flux in conservative form, and maximum absolute wave speed.
void compute_absolute_flux_jacobian(const Data &p, const ColVector_NDIM &normal, Matrix_NEQSxNEQS &absolute_flux_jacobian)
Absolute flux jacobian projected on a given normal.