Centrifugal force
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Centrifugal force
- This topic has 4 replies, 2 voices, and was last updated 3 years, 11 months ago by mathias.
-
AuthorPosts
-
September 2, 2020 at 11:33 am #5111František PrinzParticipant
Hi everybody,
I am trying to implement centrifugal forces in a experimental 2D simulation of a simplified water splitter with rotation arround the symmetry axes. Without the forces, the simulation works fine but with it it immediately diverges even for small RPM. I am using the MRT operator with forces and BGKsdynamics, velocity boundary condition at inflow and no-slip bounce-back on the walls (for details see link below)
I modified the poisuelle2d example as a starting point and tried also a small accelaration of the force and also small maximal force, without any success:T frac[1] = {}; StartScale( frac,iTvec ); std::vector<T> centrifugalForce( 2,T() ); //zadávat v lattice jednotkách T omega_rot_latt = omega_rot; T F = omega_rot_latt*omega_rot_latt*lx/2./**frac[0]*/; F = converter.getLatticeForce(F); AnalyticalLinear2D<T,T> f1 (0.,0., -1.*F, 0.8, 0., F, 0.8, 0.2, F); AnalyticalConst2D<T,T> f2 ( 0.); AnalyticalComposed2D<T,T> force(f1,f2); sLattice.defineField<FORCE>(superGeometry, 1, force); sLattice.defineField<FORCE>(superGeometry, 2, force); }
The whole code is here:
https://drive.google.com/file/d/1wEH7TOK03jWwLyZvCUbtd9wRp_Yg8bf9/view?usp=sharingAre there any constraints for the forces like at the velocities, or could be the trouble with the pressure boundary condition at the outlet? If possible, can you please refer me to suitable literature or further examples how to deal with forces in openLB, I have not found any materails about it yet.
Thanks for every hint
Regards
Frank
September 7, 2020 at 7:49 pm #5116mathiasKeymasterThe force [N] in the OpenLB implementation is force/rho in lattice units, i.e. it must be scaled by the factor “1./converter.getConversionFactorForce()*converter.getConversionFactorMass()”. I guess, that it why it doesnt work.
September 8, 2020 at 1:29 pm #5117František PrinzParticipantYes, this was the problem, thank you Mathias.
September 11, 2020 at 8:38 pm #5119František PrinzParticipantOne more extension I would like to implement is a centrifugal force in radial coordinates. For examples a cylinder rotating arround the symmetry axis. In this case the force is no more linear and I think it is not possible to use the AnayliticalLinear2D functor. How can I define arbitrary forces of more complicated form (e.g. depending on the radial distance…)?
Thanks
FrankSeptember 13, 2020 at 10:47 am #5121mathiasKeymasterFor 3D there has been a functur implemented, see search “rotating*” at dogygen https://www.openlb.net/DoxyGen/html/index.html, best Mathias
-
AuthorPosts
- You must be logged in to reply to this topic.