Nektar++
NavierStokesCFE.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File NavierStokesCFE.h
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: NavierStokes equations in conservative variable
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_NAVIERSTOKESCFE_H
36 #define NEKTAR_SOLVERS_COMPRESSIBLEFLOWSOLVER_EQUATIONSYSTEMS_NAVIERSTOKESCFE_H
37 
41 #include <MultiRegions/ContField.h>
42 
43 namespace Nektar
44 {
45  /**
46  *
47  *
48  **/
49  class NavierStokesCFE : virtual public CompressibleFlowSystem
50  {
51  public:
52  friend class MemoryManager<NavierStokesCFE>;
53 
54  // Creates an instance of this class
58  {
61  p->InitObject();
62  return p;
63  }
64  // Name of class
65  static std::string className;
66 
67  virtual ~NavierStokesCFE();
68 
69  protected:
70  std::string m_ViscosityType;
71  /// flag to switch between constant viscosity and Sutherland
72  /// an enum could be added for more options
73  bool m_is_mu_variable{false};
74  /// flag to switch between IP and LDG
75  /// an enum could be added for more options
76  bool m_is_diffIP{false};
77 
81 
83  std::string m_physicalSensorType;
84  std::string m_smoothing;
86 
87  /// Equation of system for computing temperature
89 
91 
96 
99 
101  const int nDim,
102  const Array<OneD, Array<OneD, NekDouble> > &inarray,
103  const TensorOfArray3D<NekDouble> &qfields,
104  TensorOfArray3D<NekDouble> &outarray,
105  Array< OneD, int > &nonZeroIndex = NullInt1DArray,
107  &normal = NullNekDoubleArrayOfArray,
108  const Array<OneD, NekDouble> &ArtifDiffFactor = NullNekDouble1DArray);
110  const int nSpaceDim,
111  const Array<OneD, Array<OneD, NekDouble> > &inaverg,
112  const Array<OneD, Array<OneD, NekDouble > > &inarray,
113  TensorOfArray3D<NekDouble> &outarray,
114  Array< OneD, int > &nonZeroIndex,
115  const Array<OneD, Array<OneD, NekDouble> > &normals);
116 
117  void SpecialBndTreat(
118  Array<OneD, Array<OneD, NekDouble> > &consvar);
119 
121  const Array<OneD, Array<OneD, NekDouble> > &inarray,
123 
124  void CalcViscosity(
125  const Array<OneD, const Array<OneD, NekDouble>> &inaverg,
127 
128  void InitObject_Explicit();
129 
130  virtual void v_InitObject();
131 
132  virtual void v_ExtraFldOutput(
133  std::vector<Array<OneD, NekDouble>> &fieldcoeffs,
134  std::vector<std::string> &variables);
135 
136  virtual void v_DoDiffusion(
137  const Array<OneD, const Array<OneD, NekDouble>> &inarray,
138  Array<OneD, Array<OneD, NekDouble>> &outarray,
139  const Array<OneD, const Array<OneD, NekDouble>> &pFwd,
140  const Array<OneD, const Array<OneD, NekDouble>> &pBwd);
141 
142  virtual void v_GetViscousFluxVector(
143  const Array<OneD, const Array<OneD, NekDouble>> &physfield,
144  TensorOfArray3D<NekDouble> &derivatives,
145  TensorOfArray3D<NekDouble> &viscousTensor);
146 
147  virtual void v_GetViscousFluxVectorDeAlias(
148  const Array<OneD, const Array<OneD, NekDouble>> &physfield,
149  TensorOfArray3D<NekDouble> &derivatives,
150  TensorOfArray3D<NekDouble> &viscousTensor);
151 
152  void GetPhysicalAV(
153  const Array<OneD, const Array<OneD, NekDouble>> &physfield);
154 
155  void Ducros( Array<OneD, NekDouble> &field );
156  void C0Smooth(Array<OneD, NekDouble> &field);
157 
158 
159  virtual void v_GetFluxPenalty(
160  const Array<OneD, const Array<OneD, NekDouble>> &uFwd,
161  const Array<OneD, const Array<OneD, NekDouble>> &uBwd,
162  Array<OneD, Array<OneD, NekDouble>> &penaltyCoeff);
163 
165  const Array<OneD, NekDouble> &temperature,
167  Array<OneD, NekDouble> &thermalCond);
168 
169  template <class T, typename = typename std::enable_if
170  <
171  std::is_floating_point<T>::value ||
173  >::type
174  >
176  const T& temperature, T& mu, T& thermalCond)
177  {
178  GetViscosityFromTempKernel(temperature, mu);
179  NekDouble tRa = m_Cp / m_Prandtl;
180  thermalCond = tRa * mu;
181  }
182 
183  template <class T, typename = typename std::enable_if
184  <
185  std::is_floating_point<T>::value ||
187  >::type
188  >
190  const T& temperature, T& mu)
191  {
192  // Variable viscosity through the Sutherland's law
193  if (m_is_mu_variable)
194  {
195  mu = m_varConv->GetDynamicViscosity(temperature);
196  }
197  else
198  {
199  mu = m_muRef;
200  }
201  }
202 
203  /**
204  * @brief Calculate diffusion flux using the Jacobian form.
205  *
206  * @param in
207  *
208  * @param out
209  * outarray[nvars] flux
210  */
211  template <class T, typename = typename std::enable_if
212  <
213  std::is_floating_point<T>::value ||
215  >::type
216  >
218  const unsigned short nDim,
219  const unsigned short FluxDirection,
220  const unsigned short DerivDirection,
221  // these need to be a pointers because of the custom allocator of vec_t
222  const T* inaverg,
223  const T* injumpp,
224  const T& mu,
225  T* outarray)
226  {
227  // Constants
228  unsigned short nDim_plus_one = nDim + 1;
229  unsigned short FluxDirection_plus_one = FluxDirection + 1;
230  unsigned short DerivDirection_plus_one = DerivDirection + 1;
231 
232  NekDouble gammaoPr = m_gamma / m_Prandtl;
233  NekDouble one_minus_gammaoPr = 1.0 - gammaoPr;
234 
235  constexpr NekDouble OneThird = 1. / 3.;
236  constexpr NekDouble TwoThird = 2. * OneThird;
237  constexpr NekDouble FourThird = 4. * OneThird;
238 
239 
240  if (DerivDirection == FluxDirection)
241  {
242  // rho flux always zero
243  outarray[0] = 0.0; // store 1x
244 
245  // load 1/rho
246  T oneOrho = 1.0 / inaverg[0]; // load 1x
247  // get vel, vel^2, sum of vel^2
248  std::array<T, 3> u = {{0.0, 0.0, 0.0}};
249  std::array<T, 3> u2 = {{0.0, 0.0, 0.0}};
250  T u2sum{};
251  for (unsigned short d = 0; d < nDim; ++d)
252  {
253  u[d] = inaverg[d+1] * oneOrho; // load 1x
254  u2[d] = u[d]*u[d];
255  u2sum += u2[d];
256  }
257 
258  // get E - sum v^2
259  T E_minus_u2sum = inaverg[nDim_plus_one]; // load 1x
260  E_minus_u2sum *= oneOrho;
261  E_minus_u2sum -= u2sum;
262 
263  // get nu = mu/rho
264  T nu = mu * oneOrho; // load 1x
265 
266  // ^^^^ above is almost the same for both loops
267 
268  T tmp1 = OneThird * u2[FluxDirection] + u2sum;
269  tmp1 += gammaoPr * E_minus_u2sum;
270  tmp1 *= injumpp[0]; //load 1x
271 
272  T tmp2 = gammaoPr * injumpp[nDim_plus_one] - tmp1; //load 1x
273 
274  // local var for energy output
275  T outTmpE = 0.0;
276  for (unsigned short d = 0; d < nDim; ++d)
277  {
278  unsigned short d_plus_one = d + 1;
279  //flux[rhou, rhov, rhow]
280  T outTmpD = injumpp[d_plus_one] - u[d] * injumpp[0];
281  outTmpD *= nu;
282  //flux rhoE
283  T tmp3 = one_minus_gammaoPr * u[d];
284  outTmpE += tmp3 * injumpp[d_plus_one];
285 
286  if (d == FluxDirection)
287  {
288  outTmpD *= FourThird;
289  T tmp4 = OneThird * u[FluxDirection];
290  outTmpE += tmp4 * injumpp[FluxDirection_plus_one];
291  }
292 
293  outarray[d_plus_one] = outTmpD; //store 1x
294  }
295 
296  outTmpE += tmp2;
297  outTmpE *= nu;
298  outarray[nDim_plus_one] = outTmpE; //store 1x
299 
300  }
301  else
302  {
303  // rho flux always zero
304  outarray[0] = 0.0; // store 1x
305 
306  // load 1/rho
307  T oneOrho = 1.0 / inaverg[0]; // load 1x
308  // get vel, vel^2, sum of vel^2
309  std::array<T, 3> u, u2;
310  T u2sum{};
311  for (unsigned short d = 0; d < nDim; ++d)
312  {
313  unsigned short d_plus_one = d + 1;
314  u[d] = inaverg[d_plus_one] * oneOrho; // load 1x
315  u2[d] = u[d]*u[d];
316  u2sum += u2[d];
317  // Not all directions are set
318  // one could work out the one that is not set
319  outarray[d_plus_one] = 0.0; // store 1x
320  }
321 
322  // get E - sum v^2
323  T E_minus_u2sum = inaverg[nDim_plus_one]; // load 1x
324  E_minus_u2sum *= oneOrho;
325  E_minus_u2sum -= u2sum;
326 
327  // get nu = mu/rho
328  T nu = mu * oneOrho; // load 1x
329 
330  // ^^^^ above is almost the same for both loops
331 
332  T tmp1 = u[DerivDirection] * injumpp[0] -
333  injumpp[DerivDirection_plus_one]; // load 2x
334  tmp1 *= TwoThird;
335  outarray[FluxDirection_plus_one] = nu * tmp1; // store 1x
336 
337  tmp1 = injumpp[FluxDirection_plus_one] - u[FluxDirection] * injumpp[0];
338  outarray[DerivDirection_plus_one] = nu * tmp1; // store 1x
339 
340  tmp1 = OneThird * u[FluxDirection] * u[DerivDirection];
341  tmp1 *= injumpp[0];
342 
343  T tmp2 = TwoThird * u[FluxDirection] *
344  injumpp[DerivDirection_plus_one];
345 
346  tmp1 += tmp2;
347 
348  tmp1 = u[DerivDirection] * injumpp[FluxDirection_plus_one] -
349  tmp1;
350  outarray[nDim_plus_one] = nu * tmp1; // store 1x
351 
352  }
353  }
354 
355 
356 
357  /**
358  * @brief Return the flux vector for the IP diffusion problem, based on
359  * conservative variables
360  */
361  template<bool IS_TRACE>
363  const int nDim,
364  const Array<OneD, Array<OneD, NekDouble> > &inarray,
365  const TensorOfArray3D<NekDouble> &qfields,
366  TensorOfArray3D<NekDouble> &outarray,
367  Array< OneD, int > &nonZeroIndex,
368  const Array<OneD, Array<OneD, NekDouble> > &normal,
369  const Array<OneD, NekDouble> &ArtifDiffFactor)
370  {
371  size_t nConvectiveFields = inarray.size();
372  size_t nPts = inarray[0].size();
373  size_t n_nonZero = nConvectiveFields - 1;
374 
375  // max outfield dimensions
376  constexpr unsigned short nOutMax = 3 - 2 * IS_TRACE;
377  constexpr unsigned short nVarMax = 5;
378  constexpr unsigned short nDimMax = 3;
379 
380  // vector loop
381  using namespace tinysimd;
382  using vec_t = simd<NekDouble>;
383  size_t sizeVec = (nPts / vec_t::width) * vec_t::width;
384  size_t p = 0;
385 
386  for (; p < sizeVec; p += vec_t::width)
387  {
388  // there is a significant penalty to use std::vector
389  alignas(vec_t::alignment) std::array<vec_t, nVarMax> inTmp,
390  qfieldsTmp, outTmp;
391  alignas(vec_t::alignment) std::array<vec_t, nDimMax> normalTmp;
392  alignas(vec_t::alignment) std::array<vec_t, nVarMax * nOutMax>
393  outArrTmp{{}};
394 
395  // rearrenge and load data
396  for (size_t f = 0; f < nConvectiveFields; ++f)
397  {
398  inTmp[f].load(&(inarray[f][p]), is_not_aligned);
399  // zero output vector
400  if (IS_TRACE)
401  {
402  outArrTmp[f] = 0.0;
403  }
404  else
405  {
406  for (int d = 0; d < nDim; ++d)
407  {
408  outArrTmp[f + nConvectiveFields * d] = 0.0;
409  }
410  }
411  }
412  if (IS_TRACE)
413  {
414  for (size_t d = 0; d < nDim; ++d)
415  {
416  normalTmp[d].load(&(normal[d][p]), is_not_aligned);
417  }
418  }
419 
420  // get temp
421  vec_t temperature = m_varConv->GetTemperature(inTmp.data());
422  // get viscosity
423  vec_t mu;
424  GetViscosityFromTempKernel(temperature, mu);
425 
426  for (size_t nderiv = 0; nderiv < nDim; ++nderiv)
427  {
428  // rearrenge and load data
429  for (size_t f = 0; f < nConvectiveFields; ++f)
430  {
431  qfieldsTmp[f].load(&(qfields[nderiv][f][p]), is_not_aligned);
432  }
433 
434  for (size_t d = 0; d < nDim; ++d)
435  {
436  GetViscousFluxBilinearFormKernel(nDim, d, nderiv,
437  inTmp.data(), qfieldsTmp.data(), mu, outTmp.data());
438 
439  if (IS_TRACE)
440  {
441  for (size_t f = 0; f < nConvectiveFields; ++f)
442  {
443  outArrTmp[f] += normalTmp[d] * outTmp[f];
444  }
445  }
446  else
447  {
448  for (size_t f = 0; f < nConvectiveFields; ++f)
449  {
450  outArrTmp[f + nConvectiveFields * d] += outTmp[f];
451  }
452  }
453  }
454  }
455 
456  // store data
457  if (IS_TRACE)
458  {
459  for (int f = 0; f < nConvectiveFields; ++f)
460  {
461  outArrTmp[f].store(&(outarray[0][f][p]), is_not_aligned);
462  }
463  }
464  else
465  {
466  for (int d = 0; d < nDim; ++d)
467  {
468  for (int f = 0; f < nConvectiveFields; ++f)
469  {
470  outArrTmp[f + nConvectiveFields * d].store(
471  &(outarray[d][f][p]), is_not_aligned);
472  }
473  }
474  }
475  }
476 
477  // scalar loop
478  for (; p < nPts; ++p)
479  {
480  std::array<NekDouble, nVarMax> inTmp, qfieldsTmp, outTmp;
481  std::array<NekDouble, nDimMax> normalTmp;
482  std::array<NekDouble, nVarMax * nOutMax> outArrTmp{{}};
483  // rearrenge and load data
484  for (int f = 0; f < nConvectiveFields; ++f)
485  {
486  inTmp[f] = inarray[f][p];
487  // zero output vector
488  if (IS_TRACE)
489  {
490  outArrTmp[f] = 0.0;
491  }
492  else
493  {
494  for (int d = 0; d < nDim; ++d)
495  {
496  outArrTmp[f + nConvectiveFields * d] = 0.0;
497  }
498  }
499  }
500 
501 
502  if (IS_TRACE)
503  {
504  for (int d = 0; d < nDim; ++d)
505  {
506  normalTmp[d] = normal[d][p];
507  }
508  }
509 
510  // get temp
511  NekDouble temperature = m_varConv->GetTemperature(inTmp.data());
512  // get viscosity
513  NekDouble mu;
514  GetViscosityFromTempKernel(temperature, mu);
515 
516  for (int nderiv = 0; nderiv < nDim; ++nderiv)
517  {
518  // rearrenge and load data
519  for (int f = 0; f < nConvectiveFields; ++f)
520  {
521  qfieldsTmp[f] = qfields[nderiv][f][p];
522  }
523 
524  for (int d = 0; d < nDim; ++d)
525  {
526  GetViscousFluxBilinearFormKernel(nDim, d, nderiv,
527  inTmp.data(), qfieldsTmp.data(), mu, outTmp.data());
528 
529  if (IS_TRACE)
530  {
531  for (size_t f = 0; f < nConvectiveFields; ++f)
532  {
533  outArrTmp[f] += normalTmp[d] * outTmp[f];
534  }
535  }
536  else
537  {
538  for (size_t f = 0; f < nConvectiveFields; ++f)
539  {
540  outArrTmp[f + nConvectiveFields * d] += outTmp[f];
541  }
542  }
543 
544  }
545  }
546 
547  // store data
548  if (IS_TRACE)
549  {
550  for (int f = 0; f < nConvectiveFields; ++f)
551  {
552  outarray[0][f][p] = outArrTmp[f];
553  }
554  }
555  else
556  {
557  for (int d = 0; d < nDim; ++d)
558  {
559  for (int f = 0; f < nConvectiveFields; ++f)
560  {
561  outarray[d][f][p] = outArrTmp[f + nConvectiveFields * d];
562  }
563  }
564  }
565  }
566 
567 
568  // this loop would need to be brought up into the main loop so that it
569  // can be vectorized as well
570  if (ArtifDiffFactor.size())
571  {
572  n_nonZero = nConvectiveFields;
573 
574  for (size_t p = 0; p < nPts; ++p)
575  {
576  for (int d = 0; d < nDim; ++d)
577  {
578  if (IS_TRACE)
579  {
580  NekDouble tmp = ArtifDiffFactor[p] * normal[d][p];
581 
582  for (int j = 0; j < nConvectiveFields; ++j)
583  {
584  outarray[0][j][p] += tmp * qfields[d][j][p];
585  }
586  }
587  else
588  {
589  for (int j = 0; j < nConvectiveFields; ++j)
590  {
591  outarray[d][j][p] += ArtifDiffFactor[p] * qfields[d][j][p];
592  }
593  }
594  }
595  }
596  }
597 
598  // this is always the same, it should be initialized with the IP class
599  nonZeroIndex = Array< OneD, int > {n_nonZero, 0};
600  for (int i = 1; i < n_nonZero + 1; ++i)
601  {
602  nonZeroIndex[n_nonZero - i] = nConvectiveFields - i;
603  }
604  }
605 
606  };
607 }
608 #endif
VariableConverterSharedPtr m_varConv
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
void CalcViscosity(const Array< OneD, const Array< OneD, NekDouble >> &inaverg, Array< OneD, NekDouble > &mu)
EquationOfStateSharedPtr m_eos
Equation of system for computing temperature.
NavierStokesCFE(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
virtual void v_GetViscousFluxVector(const Array< OneD, const Array< OneD, NekDouble >> &physfield, TensorOfArray3D< NekDouble > &derivatives, TensorOfArray3D< NekDouble > &viscousTensor)
Return the flux vector for the LDG diffusion problem.
void SpecialBndTreat(Array< OneD, Array< OneD, NekDouble > > &consvar)
For very special treatment. For general boundaries it does nothing But for WallViscous and WallAdiaba...
static SolverUtils::EquationSystemSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
void GetViscousSymmtrFluxConservVar(const int nSpaceDim, const Array< OneD, Array< OneD, NekDouble > > &inaverg, const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &outarray, Array< OneD, int > &nonZeroIndex, const Array< OneD, Array< OneD, NekDouble > > &normals)
Calculate and return the Symmetric flux in IP method.
Array< OneD, NekDouble > m_thermalConductivity
void GetPhysicalAV(const Array< OneD, const Array< OneD, NekDouble >> &physfield)
Calculate the physical artificial viscosity.
static std::string className
void GetViscousFluxVectorConservVar(const int nDim, const Array< OneD, Array< OneD, NekDouble > > &inarray, const TensorOfArray3D< NekDouble > &qfields, TensorOfArray3D< NekDouble > &outarray, Array< OneD, int > &nonZeroIndex, const Array< OneD, Array< OneD, NekDouble > > &normal, const Array< OneD, NekDouble > &ArtifDiffFactor)
Return the flux vector for the IP diffusion problem, based on conservative variables.
std::string m_physicalSensorType
NekDouble m_thermalConductivityRef
bool m_is_mu_variable
flag to switch between constant viscosity and Sutherland an enum could be added for more options
virtual void v_ExtraFldOutput(std::vector< Array< OneD, NekDouble >> &fieldcoeffs, std::vector< std::string > &variables)
virtual void v_GetViscousFluxVectorDeAlias(const Array< OneD, const Array< OneD, NekDouble >> &physfield, TensorOfArray3D< NekDouble > &derivatives, TensorOfArray3D< NekDouble > &viscousTensor)
Return the flux vector for the LDG diffusion problem.
MultiRegions::ContFieldSharedPtr m_C0ProjectExp
void GetViscosityAndThermalCondFromTemp(const Array< OneD, NekDouble > &temperature, Array< OneD, NekDouble > &mu, Array< OneD, NekDouble > &thermalCond)
Update viscosity todo: add artificial viscosity here.
void C0Smooth(Array< OneD, NekDouble > &field)
Make field C0.
virtual void v_DoDiffusion(const Array< OneD, const Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const Array< OneD, const Array< OneD, NekDouble >> &pFwd, const Array< OneD, const Array< OneD, NekDouble >> &pBwd)
bool m_is_diffIP
flag to switch between IP and LDG an enum could be added for more options
void Ducros(Array< OneD, NekDouble > &field)
Applied Ducros (anti-vorticity) sensor.
void GetViscousFluxVectorConservVar(const int nDim, const Array< OneD, Array< OneD, NekDouble > > &inarray, const TensorOfArray3D< NekDouble > &qfields, TensorOfArray3D< NekDouble > &outarray, Array< OneD, int > &nonZeroIndex=NullInt1DArray, const Array< OneD, Array< OneD, NekDouble >> &normal=NullNekDoubleArrayOfArray, const Array< OneD, NekDouble > &ArtifDiffFactor=NullNekDouble1DArray)
Array< OneD, NekDouble > m_mu
void GetViscousFluxBilinearFormKernel(const unsigned short nDim, const unsigned short FluxDirection, const unsigned short DerivDirection, const T *inaverg, const T *injumpp, const T &mu, T *outarray)
Calculate diffusion flux using the Jacobian form.
void GetViscosityFromTempKernel(const T &temperature, T &mu)
virtual void v_GetFluxPenalty(const Array< OneD, const Array< OneD, NekDouble >> &uFwd, const Array< OneD, const Array< OneD, NekDouble >> &uBwd, Array< OneD, Array< OneD, NekDouble >> &penaltyCoeff)
Return the penalty vector for the LDGNS diffusion problem.
void GetArtificialViscosity(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &muav)
Calculate and return the ArtificialViscosity for shock-capturing.
void GetViscosityAndThermalCondFromTempKernel(const T &temperature, T &mu, T &thermalCond)
virtual void v_InitObject()
Initialization object for CompressibleFlowSystem class.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ContField > ContFieldSharedPtr
Definition: ContField.h:292
std::shared_ptr< EquationSystem > EquationSystemSharedPtr
A shared pointer to an EquationSystem object.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Definition: MeshGraph.h:174
The above copyright notice and this permission notice shall be included.
Definition: CoupledSolver.h:1
static Array< OneD, int > NullInt1DArray
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray
std::shared_ptr< EquationOfState > EquationOfStateSharedPtr
A shared pointer to an equation of state object.
static Array< OneD, NekDouble > NullNekDouble1DArray
tinysimd::simd< NekDouble > vec_t
double NekDouble
static constexpr struct tinysimd::is_not_aligned_t is_not_aligned
typename abi< ScalarType >::type simd
Definition: tinysimd.hpp:83