Viewing 5 posts - 1 through 5 (of 5 total)
• Author
Posts
• #5111
František Prinz
Participant

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:

Are 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

#5116
mathias
Keymaster

The 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.

#5117
František Prinz
Participant

Yes, this was the problem, thank you Mathias.

#5119
František Prinz
Participant

One 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
Frank

#5121
mathias
Keymaster

For 3D there has been a functur implemented, see search “rotating*” at dogygen https://www.openlb.net/DoxyGen/html/index.html, best Mathias

Viewing 5 posts - 1 through 5 (of 5 total)
• You must be logged in to reply to this topic.