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

PostProcessor for assigning the velocity at inlet and outlets to lattice two and three. More...

#include <freeEnergyPostProcessor3D.h>

+ Inheritance diagram for olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >:
+ Collaboration diagram for olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >:

Public Member Functions

 FreeEnergyInletOutletCoupling3D (int x0_, int x1_, int y0_, int y1_, int z0_, int z1_, std::vector< BlockStructureD< 3 > * > partners_)
 
 FreeEnergyInletOutletCoupling3D (std::vector< BlockStructureD< 3 > * > partners_)
 
int extent () const override
 Extent of application area (0 for purely local operations)
 
int extent (int whichDirection) const override
 Extent of application area along a direction (0 or 1)
 
void process (BlockLattice< T, DESCRIPTOR > &blockLattice) override
 Execute post-processing step.
 
void processSubDomain (BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override
 Execute post-processing step on a sublattice.
 
- Public Member Functions inherited from olb::PostProcessor3D< T, DESCRIPTOR >
 PostProcessor3D ()
 
virtual ~PostProcessor3D ()
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
int getPriority () const
 read only access to priority
 

Additional Inherited Members

- Protected Attributes inherited from olb::PostProcessor3D< T, DESCRIPTOR >
int _priority
 

Detailed Description

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

PostProcessor for assigning the velocity at inlet and outlets to lattice two and three.

This should be assigned to the second lattice after FreeEnergyForcePostProcessor. The first lattice should be the first partner lattice.

Definition at line 106 of file freeEnergyPostProcessor3D.h.

Constructor & Destructor Documentation

◆ FreeEnergyInletOutletCoupling3D() [1/2]

template<typename T , typename DESCRIPTOR >
olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >::FreeEnergyInletOutletCoupling3D ( int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_,
std::vector< BlockStructureD< 3 > * > partners_ )
Parameters
[in]partners_- Contains one partner lattice for two fluid components, or two lattices for three components.

Definition at line 385 of file freeEnergyPostProcessor3D.hh.

388 : x0(x0_), x1(x1_), y0(y0_), y1(y1_), z0(z0_), z1(z1_), partners(partners_)
389{
390 this->getName() = "FreeEnergyInletOutletCoupling3D";
391}
std::string & getName()
read and write access to name

References olb::PostProcessor3D< T, DESCRIPTOR >::getName().

+ Here is the call graph for this function:

◆ FreeEnergyInletOutletCoupling3D() [2/2]

template<typename T , typename DESCRIPTOR >
olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >::FreeEnergyInletOutletCoupling3D ( std::vector< BlockStructureD< 3 > * > partners_)
Parameters
[in]partners_- Contains one partner lattice for two fluid components, or two lattices for three components.

Definition at line 394 of file freeEnergyPostProcessor3D.hh.

396 : x0(0), x1(0), y0(0), y1(0), z0(0), z1(0), partners(partners_)
397{
398 this->getName() = "FreeEnergyInletOutletCoupling3D";
399}

References olb::PostProcessor3D< T, DESCRIPTOR >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ extent() [1/2]

template<typename T , typename DESCRIPTOR >
int olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >::extent ( ) const
inlineoverridevirtual

Extent of application area (0 for purely local operations)

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 113 of file freeEnergyPostProcessor3D.h.

114 {
115 return 0;
116 }

◆ extent() [2/2]

template<typename T , typename DESCRIPTOR >
int olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >::extent ( int direction) const
inlineoverridevirtual

Extent of application area along a direction (0 or 1)

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 117 of file freeEnergyPostProcessor3D.h.

118 {
119 return 0;
120 }

◆ process()

template<typename T , typename DESCRIPTOR >
void olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >::process ( BlockLattice< T, DESCRIPTOR > & blockLattice)
overridevirtual

Execute post-processing step.

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 434 of file freeEnergyPostProcessor3D.hh.

436{
437 processSubDomain(blockLattice, x0, x1, y0, y1, z0, z1);
438}
void processSubDomain(BlockLattice< T, DESCRIPTOR > &blockLattice, int x0_, int x1_, int y0_, int y1_, int z0_, int z1_) override
Execute post-processing step on a sublattice.

◆ processSubDomain()

template<typename T , typename DESCRIPTOR >
void olb::FreeEnergyInletOutletCoupling3D< T, DESCRIPTOR >::processSubDomain ( BlockLattice< T, DESCRIPTOR > & blockLattice,
int x0_,
int x1_,
int y0_,
int y1_,
int z0_,
int z1_ )
overridevirtual

Execute post-processing step on a sublattice.

Implements olb::PostProcessor3D< T, DESCRIPTOR >.

Definition at line 402 of file freeEnergyPostProcessor3D.hh.

405{
406 // If partners.size() == 1: two fluid components
407 // If partners.size() == 2: three fluid components
408 BlockLattice<T,DESCRIPTOR> *partnerLattice1 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[0]);
409 BlockLattice<T,DESCRIPTOR> *partnerLattice2 = 0;
410 if (partners.size() > 1) {
411 partnerLattice2 = static_cast<BlockLattice<T,DESCRIPTOR> *>(partners[1]);
412 }
413
414 int newX0, newX1, newY0, newY1, newZ0, newZ1;
415 if ( util::intersect ( x0, x1, y0, y1, z0, z1,
416 x0_, x1_, y0_, y1_, z0_, z1_,
417 newX0, newX1, newY0, newY1, newZ0, newZ1 ) ) {
418 for (int iX=newX0; iX<=newX1; ++iX) {
419 for (int iY=newY0; iY<=newY1; ++iY) {
420 for (int iZ=newZ0; iZ<=newZ1; ++iZ) {
421 T u[DESCRIPTOR::d];
422 partnerLattice1->get(iX,iY,iZ).computeU(u);
423 blockLattice.get(iX,iY,iZ).defineU(u);
424 if (partners.size() > 1) {
425 partnerLattice2->get(iX,iY,iZ).defineU(u);
426 }
427 }
428 }
429 }
430 }
431}
bool intersect(int x0, int x1, int y0, int y1, int x0_, int x1_, int y0_, int y1_, int &newX0, int &newX1, int &newY0, int &newY1)
Definition util.h:89

References olb::BlockLattice< T, DESCRIPTOR >::get(), and olb::util::intersect().

+ Here is the call graph for this function:

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