Reply To: STLreader error?
Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum, first register on this website and then send a message via our contact form.
› Forums › OpenLB › General Topics › STLreader error? › Reply To: STLreader error?
August 12, 2025 at 10:58 pm
#10642
arjun_raf
Participant
Hey @mathias,
My stl model is in metres, 41.56 m to be precise. dx was then given as ~1e-3. I noticed that I made a mistake in the above code for the stlSize scaling factor which I changed to 1. Even then, the output remains the same. I can show the modified parts of the code below:
const T physLength = 41.56; // reference length of simulation geometry in [m]
const T N = 40000; // number of voxels per charPhysL
const T dx = physLength / N; // lattice spacing in [m]
const T CFL = 0.05;
const T Re = 20;
...
...
UnitConverter<T,DESCRIPTOR> converter(
(T) dx, // physDeltaX: spacing between two lattice cells in [m]
(T) CFL*dx/0.2, // physDeltaT: time step in [s]
(T) physLength, // charPhysLength: reference length of simulation geometry in [m]
(T) 0.2, // charPhysVelocity: highest expected velocity during simulation in [m/s]
(T) 0.2*0.05/Re, // physViscosity: physical kinematic viscosity in [m^2/s]
(T) 1000.0 // physDensity: physical density in [kg/m^3]
);
converter.print();
STLreader<T> simvol( "sim_volume.stl", converter.getPhysDeltaX(), 1);
The rest remains the same.
