Using example (cylinder3D)
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Using example (cylinder3D)
 This topic has 4 replies, 3 voices, and was last updated 1 year, 4 months ago by mathias.

AuthorPosts

January 30, 2023 at 9:53 am #7148H.YuParticipant
Hi all,
I’m OpenLB NOOB.
I want to look at several examples and proceed with the airfoil, so I am going to proceed with naca4412 by applying the cylinder 3d example.I created it the same as the .stl of the cylinder example and changed only the cylinder part to the shape of an airfoil.
The modified part of the code is the part that reads the stl file name.
Several problems arose during the process.1.
│[SuperGeometry3D] cleaned 0 outer boundary voxel(s)
│naca4412_3d: ../../../src/functors/analytical/indicator/indicatorF3D.hh:615: olb::IndicatorCuboMakefile cylinder3d.d cylinder3d.o naca4412 naca4412.d naca4412_0deg.stl
│id3D<T>::IndicatorCuboid3D(olb::Vector<T, 3>, olb::Vector<T, 3>) [with S = double]: Assertion `cylinder3d cylinder3d.fcstd cylinder3d.pvsm naca4412.cpp naca4412.o tmp
│_xLength>0 && _yLength>0 && _zLength>0′ failed.
│AbortedHow can i solve that problem?
January 30, 2023 at 10:13 am #7149H.YuParticipantSorry, it was a problem caused by wrong scaling.
I’ve solved the problem, but are there any ways to do more precise calculations?
Reynolds 50k or moreJanuary 30, 2023 at 10:25 am #7150AdrianKeymasterGlad to hear that you were able to solve it. You can definitely increase the Reynolds number and simulate turbulent flows using LBM. Either using DNS or (more commonly) using a LES model such as Smagorinsky. See e.g. the
turbulence/nozzle3d
example case to get started.Examples for high Reynolds simulations using OpenLB include 10.1016/j.buildenv.2021.107618 and 10.2514/6.20132573.
January 31, 2023 at 11:27 am #7152H.YuParticipantthanks for your comment
I am trying to perform turbulence on an airfoil using the 3D cylinder example.
What is the difference between physics speed and lattice speed, kinematic viscosity?If i set the Reynolds number to 50000 and proceed, the output will be as follows.
Can you help? I am attaching both Input and Output. thank you.This is the source code ‘unitconverter.h’.
/// return Reynolds number
constexpr T getReynoldsNumber( ) const
{
return _charPhysVelocity * _charPhysLength / _physViscosity;
}INPUT : (Reynolds Number = 50000 )
UnitConverter<T, DESCRIPTOR> converter(
(T) 0.1/N, // physDeltaX: spacing between two lattice cells in __m__
(T) 0.1/(M*N), // physDeltaT: time step in __s__
(T) 0.1, // charPhysLength: reference length of simulation geometry
(T) 7.504, // charPhysVelocity: maximal/highest expected velocity during simulation in __m / s__
(T) 1.2*7.504*0.1/Re, // physViscosity: physical kinematic viscosity in __m^2 / s__
(T) 1.2 // physDensity: physical density in __kg / m^3__
);
// Prints the converter log as console output
converter.print();OUTPUT :
[UnitConverter] —————– UnitConverter information —————–
[UnitConverter] — Parameters:
[UnitConverter] Resolution: N= 40
[UnitConverter] Lattice velocity: latticeU= 0.3752
[UnitConverter] Lattice relaxation frequency: omega= 0.312359
[UnitConverter] Lattice relaxation time: tau= 3.20144
[UnitConverter] Characteristical length(m): charL= 0.1
[UnitConverter] Characteristical speed(m/s): charU= 7.504
[UnitConverter] Phys. kinematic viscosity(m^2/s): charNu= 0.045024
[UnitConverter] Phys. density(kg/m^d): charRho= 1.2
[UnitConverter] Characteristical pressure(N/m^2): charPressure= 0
[UnitConverter] Mach number: machNumber= 0.649865
[UnitConverter] Reynolds number: reynoldsNumber= 16.6667
[UnitConverter] Knudsen number: knudsenNumber= 0.0389919
[UnitConverter]
[UnitConverter] — Conversion factors:
[UnitConverter] Voxel length(m): physDeltaX= 0.0025
[UnitConverter] Time step(s): physDeltaT= 0.000125
[UnitConverter] Velocity factor(m/s): physVelocity= 20
[UnitConverter] Density factor(kg/m^3): physDensity= 1.2
[UnitConverter] Mass factor(kg): physMass= 1.875e08
[UnitConverter] Viscosity factor(m^2/s): physViscosity= 0.05
[UnitConverter] Force factor(N): physForce= 0.003
[UnitConverter] Pressure factor(N/m^2): physPressure= 480
[UnitConverter] ————————————————————January 31, 2023 at 9:27 pm #7154mathiasKeymasterTo see how to correctly set the Re and other parameters have a look at the cylinder2d and cylinder3d example and also the aorta3d example. Also look in the there cited reverence. Further, there is a section in the user guide and we have a lesson at our spring school!

AuthorPosts
 You must be logged in to reply to this topic.