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

PostProcessors for the chemical potential boundary condition in the free energy model. More...

#include <boundaryPostProcessors3D.h>

+ Collaboration diagram for olb::FreeEnergyChemPotBoundaryProcessor3DA< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >:

Public Member Functions

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

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCell
 

Detailed Description

template<typename T, typename DESCRIPTOR, int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
class olb::FreeEnergyChemPotBoundaryProcessor3DA< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >

PostProcessors for the chemical potential boundary condition in the free energy model.

The chemical potentials on the boundary are set equal to the chemical potential on the fluid cell normal to the boundary. This is necessary because the coupling between the lattices requires the calculation of the gradient of the chemical potential.

It would be preferable if these were implemented as a lattice coupling that ran between the chemical potential and force lattice couplings. However there is no access to the discrete normals in lattice couplings.

Definition at line 208 of file boundaryPostProcessors3D.h.

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR , int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
template<CONCEPT(Cell) CELL>
void olb::FreeEnergyChemPotBoundaryProcessor3DA< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >::apply ( CELL & cell)

Definition at line 529 of file boundaryPostProcessors3D.hh.

529 {
530
531 cell.template setField<descriptors::CHEM_POTENTIAL>(
532 cell.neighbor({-NORMAL_X,-NORMAL_Y,-NORMAL_Z}).template getField<descriptors::CHEM_POTENTIAL>());
533
534 T rho0 = cell.computeRho();
535 T rho1 = cell.neighbor({-NORMAL_X,-NORMAL_Y,-NORMAL_Z}).computeRho();
536
537 cell.template setField<descriptors::CHEM_POTENTIAL>(
538 cell.template getField<descriptors::CHEM_POTENTIAL>() + (rho1 / rho0 - 1) / descriptors::invCs2<T,DESCRIPTOR>());
539}

◆ getPriority()

template<typename T , typename DESCRIPTOR , int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
int olb::FreeEnergyChemPotBoundaryProcessor3DA< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >::getPriority ( ) const
inline

Definition at line 212 of file boundaryPostProcessors3D.h.

212 {
213 return 0;
214 }

Member Data Documentation

◆ scope

template<typename T , typename DESCRIPTOR , int NORMAL_X, int NORMAL_Y, int NORMAL_Z>
constexpr OperatorScope olb::FreeEnergyChemPotBoundaryProcessor3DA< T, DESCRIPTOR, NORMAL_X, NORMAL_Y, NORMAL_Z >::scope = OperatorScope::PerCell
staticconstexpr

Definition at line 210 of file boundaryPostProcessors3D.h.


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