OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
olb::FreeSurfaceToFluidCellConversionPostProcessor3D< T, DESCRIPTOR > Class Template Reference

#include <freeSurfacePostProcessor3D.h>

+ Collaboration diagram for olb::FreeSurfaceToFluidCellConversionPostProcessor3D< T, DESCRIPTOR >:

Public Member Functions

int getPriority () const
 
template<typename CELL >
void apply (CELL &cell) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCell
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::FreeSurfaceToFluidCellConversionPostProcessor3D< T, DESCRIPTOR >

Definition at line 72 of file freeSurfacePostProcessor3D.h.

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR >
template<typename CELL >
void olb::FreeSurfaceToFluidCellConversionPostProcessor3D< T, DESCRIPTOR >::apply ( CELL & cell)

Definition at line 229 of file freeSurfacePostProcessor3D.hh.

229 {
230 using namespace olb::FreeSurface;
231 /*
232 * Initializing new interface cells with DFs from surrounding fluid and interface cells
233 * Just takes the arithmetic average.
234 */
238 T rho_avg = 0.;
239 T u_avg[DESCRIPTOR::d] = {0., 0.};
240
241 std::size_t ctr = 0;
242
243 for(int iPop=1; iPop<DESCRIPTOR::q; iPop++) {
244 auto cellC = cell.neighbor({descriptors::c<DESCRIPTOR>(iPop,0),
245 descriptors::c<DESCRIPTOR>(iPop,1),
246 descriptors::c<DESCRIPTOR>(iPop,2)});
247
249 T rho_tmp = 0.;
250 T u_tmp[DESCRIPTOR::d] = {0., 0.};
251 ++ctr;
252 cellC.computeRhoU(rho_tmp, u_tmp);
253 rho_avg += rho_tmp;
254 for(size_t i = 0; i < DESCRIPTOR::d; ++i){
255 u_avg[i] += u_tmp[i];
256 }
257 }
258 }
259
260 if(ctr > 0){
261 rho_avg /= static_cast<T>(ctr);
262 for(size_t i = 0; i < DESCRIPTOR::d; ++i){
263 u_avg[i] /= static_cast<T>(ctr);
264 }
265 }
266
267 cell.iniEquilibrium(rho_avg, u_avg);
268 }
270 /*
271 * If a toGas cell has a neighbouring toFluid cell, unset the toGas flag
272 */
274 setCellFlags(cell, static_cast<FreeSurface::Flags>(0));
275 }
276 }
277}
void setCellFlags(CELL &cell, const FreeSurface::Flags &flags)
bool hasNeighbourFlags(CELL &cell, const FreeSurface::Flags &flags)
bool isCellType(CELL &cell, const FreeSurface::Type &type)
bool hasCellFlags(CELL &cell, const FreeSurface::Flags &flags)

References olb::FreeSurface::Fluid, olb::FreeSurface::Gas, olb::FreeSurface::Interface, olb::FreeSurface::NewInterface, olb::FreeSurface::ToFluid, and olb::FreeSurface::ToGas.

◆ getPriority()

template<typename T , typename DESCRIPTOR >
int olb::FreeSurfaceToFluidCellConversionPostProcessor3D< T, DESCRIPTOR >::getPriority ( ) const
inline

Definition at line 76 of file freeSurfacePostProcessor3D.h.

76 {
77 return 4;
78 }

Member Data Documentation

◆ scope

template<typename T , typename DESCRIPTOR >
constexpr OperatorScope olb::FreeSurfaceToFluidCellConversionPostProcessor3D< T, DESCRIPTOR >::scope = OperatorScope::PerCell
staticconstexpr

Definition at line 74 of file freeSurfacePostProcessor3D.h.


The documentation for this class was generated from the following files: