## Forum Replies Created

Viewing 15 posts - 46 through 60 (of 90 total)
• Author
Posts
• in reply to: Setting Boundary Values #2529
robin.trunk
Keymaster

Hi Sumit,

what is the Reynolds number of the case you are trying to simulate?
Since the instabilities probably arise from a high Reynolds number you could try to apply a turbulence model. You can have a look at the aorta3D example where a Smagorinsky turbulence model is applied. This should allow for bigger timesteps or a coarser resolution.

Best
Robin

in reply to: Setting Boundary Values #2526
robin.trunk
Keymaster

Hi Sumit,

in this example yes the physical velocity is charU * latticeL. Usually setting latticeU will give you charU as physical velocity (for a scaling factor of 1), however in this example the scaling factor in the CirclePoiseuille is chosen to be latticeL.
This scaling is not necessary if you replace
CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU(), converter.getLatticeL());
by
CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU(), 1.);
or
CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU());
you will get a inlet velocity of 100m/s for charU=100m/s.

To learn more about the transformations (e.g. what is effected by latticeU) you could have a look at the doxygen of the unit converter:
http://optilb.com/DoxyGen/html/d1/d25/classolb_1_1LBconverter.html

The influence of compressibility should be related to the Mach number, to find more detailed information I can recommend e.g.
T. Krüger, H. Kusumaatmaja, A. Kuzmin, O. Shardt, G. Silva, E.M. Viggen. The Lattice Boltzmann Method – Principles and Practice

Best
Robin

in reply to: Saving Local Pressure Values #2524
robin.trunk
Keymaster

Hi Sumit,

replacing
intpolateVelocity( &p1,point );
by
intpolateVelocity( u1,point );

Best
Robin

in reply to: Setting Boundary Values #2519
robin.trunk
Keymaster

Hi Sumit,

what values do you use for the pressure? For the velocity let me elaborate it with an example:
Setting:
latticeU = 0.01
charU = 0.2
latticeL = 0.01
then applying:
CirclePoiseuille3D<T> poiseuilleU(superGeometry, 3, converter.getLatticeU(), converter.getLatticeL());
will give you the velocity:
charU * latticeL = 0.002
latticeU will result in charU, however some functions contain a scaling factor (here converter.getLatticeL()) that you have to consider. However if you want to omit this factor it defaults to 1. But maybe your problem is such a factor, see e.g.
http://optilb.com/DoxyGen/html/db/d0d/classolb_1_1CirclePoiseuille3D.html

Best
Robin

in reply to: Setting Boundary Values #2517
robin.trunk
Keymaster

Hi Sumit,

latticeU and charU are conversion factors. latticeU is the lattice velocity in m/s. The boundary functions expect lattice values, it converts such that setting latticeU on the bonudary will give you charU as physical result.
For the pressure boundary the stability problem could arise from inducing large gradients.

Best
Robin

in reply to: Pipe flow #2516
robin.trunk
Keymaster

Hi Sumit,

something seems to be wrong with the outlet bonudary, how do you set it?
Are the material numbers set correct, so that the boundary is applied at the right location? You can check that in the pvd file output for the geometry with Paraview.

Best
Robin

in reply to: Pressure Inlet #2509
robin.trunk
Keymaster

Hi Sumit,

thats correct. Once initialized the value can not be changed. Usually the values of the boundary are updated in the setBoundaryValues() function of a case file (see e.g. Cylinder2D example where a Poiseuille2D functor is applied instead of a AnalyticalConst3D). So in every time step the object is constructed woth a different value.

Best
Robin

in reply to: Saving Local Pressure Values #2507
robin.trunk
Keymaster

Hi Sumit,

you can get the pressure “p1” at a physical location “point” as follows:

Quote:
SuperLatticePhysPressure3D<T, DESCRIPTOR> pressure(sLattice, converter); // create functor
AnalyticalFfromSuperF3D<T> intpolatePressure( pressure, true ); // prepare functor to accept physical locations by interpolation
T point[3] = {1.,0,0}; // physical location
T p1=0;
intpolatePressure( &p1,point ); // compute pressure at point1 and wirte value in p1
std::cout << “pressure= ” << p1 << std::endl;

To create a file containing the pressure values, C++ should provide some functions.

Best
Robin

in reply to: Pressure Inlet #2506
robin.trunk
Keymaster

Hi Sumit,

AnalyticalConst3D<T,T> rhoF(1) should initialize a functor rhoF with value 1. The AnalyticalF3D is rather a mother class and can not be directly initialized with a value.

Best
Robin

in reply to: Pressure Inlet #2503
robin.trunk
Keymaster

Hi Sumit,

the function defineRho() expects lattice values. To convert a physical pressure to a lattice value, there is a function in the LBconverter called rhoFromPhysicalPressure, just have a look at the doxygen documentation:
http://optilb.com/DoxyGen/html/d1/d25/classolb_1_1LBconverter.html#aa6409429bced9f84d2035b196ace082c

Also when looking at e.g. the cylinder2D example the inflow velocity is slowly increased in the function setBoundaryValues(), you could try that for the pressure too. Setting large gradients without smooth transition can lead to numerical instabilities.

Best
Robin

#2462
robin.trunk
Keymaster

Hi applous6,

for the boundary conditions you can have a look at the example multiComponent3d, in there especially the function prepareLattice. For the obstacle you can use a bounce-back boundary, as it is done there for material number 3 and 4. This has to be applied to both lattices.

Best
Robin

#2458
robin.trunk
Keymaster

Hi applous6,

do you get an error message? Maybe the periodic boundary is colliding with some velocity boundaries what can lead to problems. Did you set the periodicity for all directions?

Best
Robin

in reply to: Drag Force (Coefficient) #2448
robin.trunk
Keymaster

Hi Alina,rnrnif you are doing a 3D simulation, you can estimate that by dividing the L_lattice by 3, your number of cells will increase by 3^3=27. Depending on what you simulate (multiphase or single phase) the rquired simulation time will increase by this factor.rnrnBestrnRobin

in reply to: Drag Force (Coefficient) #2451
robin.trunk
Keymaster

Hi Alina,rnrnhaving a look at the relaxation time and viscosity one can see that the system gets unstable if the relaxation time tau gets close to 0.5. You can have a look how tau is computed in the LBconverter:rntau = (U_lattice * char_nu) / (L_lattice * U_char)rnSo your suggestion is correct to keep the value of tau constant.rnrnBestrnRobin

in reply to: OpenLB 3D cylinder example #2449
robin.trunk
Keymaster

Hi Simon,rnrnI think there are 3 options to do this:rnrn1) Edit the .stl file like you said. Here you just need to modify the STL, not the fcstd. However the material number for the cylinder is set in “”prepareGeometry””, you maybe have to adapt the “”/// Set material number for cylinder”” part.rnrn2) You can construct your own geometry using the indicator-functors. This way you can easily modify your geometry later on, just like in cylinder2D.rnrn3) You can set material numbers by hand. You can’t find a blockGeometry, since a superGeometry is used, that consists of blockGeometries. Looking at the doxygen the superGeometry3D has functions “”set”” to modify the material number. However I think this would be the most work intensive way to modify the geometry in your case.rnrnBestrnRobin

Viewing 15 posts - 46 through 60 (of 90 total)