OpenLB 1.7
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
olb::TotalEnthalpyPhaseChangeCoupling Struct Reference

TotalEnthalpyPhaseChange between a Navier-Stokes and an Advection-Diffusion lattice. More...

#include <navierStokesAdvectionDiffusionCoupling.h>

+ Collaboration diagram for olb::TotalEnthalpyPhaseChangeCoupling:

Classes

struct  CP_L
 
struct  CP_S
 
struct  FORCE_PREFACTOR
 
struct  L
 
struct  T0
 
struct  T_L
 
struct  T_S
 

Public Types

using parameters = meta::list<FORCE_PREFACTOR,T0, CP_S, CP_L, T_S, T_L, L>
 

Public Member Functions

template<typename CELLS , typename PARAMETERS >
void apply (CELLS &cells, PARAMETERS &parameters) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCellWithParameters
 

Detailed Description

TotalEnthalpyPhaseChange between a Navier-Stokes and an Advection-Diffusion lattice.

Definition at line 32 of file navierStokesAdvectionDiffusionCoupling.h.

Member Typedef Documentation

◆ parameters

Definition at line 47 of file navierStokesAdvectionDiffusionCoupling.h.

Member Function Documentation

◆ apply()

template<typename CELLS , typename PARAMETERS >
void olb::TotalEnthalpyPhaseChangeCoupling::apply ( CELLS & cells,
PARAMETERS & parameters )
inline

Definition at line 50 of file navierStokesAdvectionDiffusionCoupling.h.

51 {
52 using V = typename CELLS::template value_t<names::NavierStokes>::value_t;
53 using DESCRIPTOR = typename CELLS::template value_t<names::NavierStokes>::descriptor_t;
54
55 auto& cellNSE = cells.template get<names::NavierStokes>();
56 auto& cellADE = cells.template get<names::Temperature>();
57
58 V enthalpy = cellADE.computeRho();
59 auto& dynamics = cellADE.getDynamics();
60 /*auto& dynParams = static_cast<ParametersOfDynamicsD<DYNAMICS>&>(
61 tPartner->template getData<OperatorParameters<DYNAMICS>>());*/
62
63 //cellNSE.template setField<descriptors::POROSITY>(
64 //dynamics->template computeLiquidFraction<T>(parameters, enthalpy)
65 //);
66
67 auto temperature = cellADE.template getFieldPointer<descriptors::TEMPERATURE>();
68 //temperature[0] = dynamics->computeTemperature<V, parameters, enthalpy>();
69
70 // computation of the bousinessq force
71 auto force = cellNSE.template getFieldPointer<descriptors::FORCE>();
72 auto forcePrefactor = parameters.template get<FORCE_PREFACTOR>();
73 V temperatureDifference = cellADE.computeRho() - parameters.template get<T0>();
74 for (unsigned iD = 0; iD < DESCRIPTOR::d; ++iD) {
75 force[iD] = forcePrefactor[iD] * temperatureDifference;
76 }
77 // Velocity coupling
78 V u[DESCRIPTOR::d] { };
79 cellNSE.computeU(u);
80 cellADE.template setField<descriptors::VELOCITY>(u);
81 }
meta::list< FORCE_PREFACTOR, T0, CP_S, CP_L, T_S, T_L, L > parameters

Member Data Documentation

◆ scope

constexpr OperatorScope olb::TotalEnthalpyPhaseChangeCoupling::scope = OperatorScope::PerCellWithParameters
staticconstexpr

Definition at line 33 of file navierStokesAdvectionDiffusionCoupling.h.


The documentation for this struct was generated from the following file: