Reply To: Point-by-point field – pressure( density ) free energy boundary condition in 3D
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Point-by-point field – pressure( density ) free energy boundary condition in 3D › Reply To: Point-by-point field – pressure( density ) free energy boundary condition in 3D
Hi Alice,
1) I’m not familiar with this, so someone might be able to offer a better way. Phi is accessed by calculating the ‘density’ on the order parameter super lattice (the one using FreeEnergyBGKdynamics). So, for each block lattice on this super lattice you should iterate through the cells and then call computeRho()
, appending each value to the vector.
2a) Just to check, when you call setFreeEnergy[Inlet/Outlet]Boundary
have you set the type argument to “density”, rather than “velocity”? You can then call defineRho
to set the desired density on the inlet and outlet nodes. I think that should be sufficient.
2b) As for the inletOutletCoupling
, this is needed to pass the velocity from the density lattice to the order parameter lattice(s) for the collision. This is especially necessary with density constraints because the velocity is constantly being updated. You can see how it is used in the microfluidics2d example. One thing to note is that, like ForceCoupling
, the density lattice should be labelled B and the order parameter lattice labelled A (and C if using a ternary fluid system).
It has been a while since I have looked at this so there might be some inaccuracies.
Sam