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?
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?
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>();
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.
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.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok