Viewing 7 posts - 1 through 7 (of 7 total)
• Author
Posts
• #5700
Gloriousface
Participant

Hello，everyone

I’m doing Laplace simulation. I want to set the upper, bottom,left and right boundaries as periodic boundaries. Can “setPeriodicity（true，true）” successfully set the periodicity of the upper, bottom , left and right boundaries？

Best
Gloriousface

#5701
Gloriousface
Participant

Hello，all

I want to output the pressure difference between two positions (lattice units), but I find that the output pressure in cyliner2d is a physical unit. Is there a function that can help me output the pressure in lattice units？

Thanks

#5702
Keymaster

Yes, the periodicity in OpenLB is configured via `CuboidGeometry::setPeriodicity`. In 2D `setPeriodicity(true, true)` does what you want.

#5703
Keymaster

The functor for extracting pressure information `SuperLatticePhysPressure2D` returns the physical pressure w.r.t. the given unit converter. Currently no `SuperLatticePressure2D` exists but this would be trivial to implement either by adapting the physical pressure functor or by using functor arithmetic. E.g. (untested):

``````
SuperLatticeDensity2D<T,DESCRIPTOR> densityF(sLattice);
auto latticePressureF = (functor_dsl::lift(densityF) - 1.0) / descriptors::invCs2<T,DESCRIPTOR>();
``````
#5704
Gloriousface
Participant

Thank you very much for your reply,But I don’t quite understand this sentence “functor_dsl::lift(densityF) – 1.0”，I hope you can help me solve this problem. Thank you again.

#5705
This is a functor arithmetic expression for substracting 1 from the result of calling `densityF`. `functor_dsl::lift` is a helper for wrapping a reference in a `std::shared_ptr` for which functor arithmetic is implemented. This is just used here for brevity, one could also construct the density functor inside a shared pointer directly.