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

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

#include <boundaryPostProcessors2D.h>

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

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>
class olb::FreeEnergyChemPotBoundaryProcessor2DA< T, DESCRIPTOR, NORMAL_X, NORMAL_Y >

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 69 of file boundaryPostProcessors2D.h.

Member Function Documentation

◆ apply()

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

Definition at line 475 of file boundaryPostProcessors2D.hh.

475 {
476
477 cell.template setField<descriptors::CHEM_POTENTIAL>(
478 cell.neighbor({-NORMAL_X,-NORMAL_Y}).template getField<descriptors::CHEM_POTENTIAL>());
479
480 T rho0 = cell.computeRho();
481 T rho1 = cell.neighbor({-NORMAL_X,-NORMAL_Y}).computeRho();
482
483 cell.template setField<descriptors::CHEM_POTENTIAL>(
484 cell.template getField<descriptors::CHEM_POTENTIAL>() + (rho1 / rho0 - 1) / descriptors::invCs2<T,DESCRIPTOR>());
485}

◆ getPriority()

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

Definition at line 73 of file boundaryPostProcessors2D.h.

73 {
74 return 0;
75 }

Member Data Documentation

◆ scope

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

Definition at line 71 of file boundaryPostProcessors2D.h.


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