OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::collision::SubgridParticle< COLLISION >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > Struct Template Reference

#include <porousBGKdynamics.h>

+ Collaboration diagram for olb::collision::SubgridParticle< COLLISION >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >:

Public Types

using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
using CollisionO = typename COLLISION::template type<DESCRIPTOR,MOMENTA,EQUILIBRIUM>
 

Public Member Functions

template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters)
 

Detailed Description

template<typename COLLISION>
template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM>
struct olb::collision::SubgridParticle< COLLISION >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 241 of file porousBGKdynamics.h.

Member Typedef Documentation

◆ CollisionO

template<typename COLLISION >
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::collision::SubgridParticle< COLLISION >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::CollisionO = typename COLLISION::template type<DESCRIPTOR,MOMENTA,EQUILIBRIUM>

Definition at line 243 of file porousBGKdynamics.h.

◆ MomentaF

template<typename COLLISION >
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::collision::SubgridParticle< COLLISION >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 242 of file porousBGKdynamics.h.

Member Function Documentation

◆ apply()

template<typename COLLISION >
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::collision::SubgridParticle< COLLISION >::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 246 of file porousBGKdynamics.h.

246 {
247 V rho, u[DESCRIPTOR::d];
248 MomentaF().computeRhoU(cell, rho, u);
249 V porosity = cell.template getField<descriptors::POROSITY>();
250 auto extVelocity = cell.template getFieldPointer<descriptors::LOCAL_DRAG>();
251 // if (porosity[0] != 0) {
252 // cout << "extVelocity: " << extVelocity[0] << " " << extVelocity[1] << " " << extVelocity[2] << " " << std::endl;
253 // cout << "porosity: " << porosity[0] << std::endl;
254 // }
255 for (int i=0; i<DESCRIPTOR::d; i++) {
256 u[i] *= (1.-porosity);
257 u[i] += extVelocity[i];
258 }
259
260 V uSqr = CollisionO().apply(cell, parameters);
261
262 //statistics.incrementStats(rho, uSqr);
263 cell.template setField<descriptors::POROSITY>(0);
264 cell.template setField<descriptors::VELOCITY_NUMERATOR>(0);
265 cell.template setField<descriptors::VELOCITY_DENOMINATOR>(0);
266
267 return {rho, uSqr};
268 }
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
typename MOMENTA::template type< DESCRIPTOR > MomentaF
typename meta::list< descriptors::OMEGA > parameters

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