Skip to content

Problem about running with a input stl file

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Problem about running with a input stl file

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #8671
    Bobbie
    Participant

    Dear communities:

    I’m try to input a new 3d geometry from stl file to replace the original geometry in the cylinder3d example. While there were no compilation errors resulting from the geometry change, the terminal displayed the following information before terminating:

    ../../../src/functors/analytical/indicator/indicatorF3D.hh:624: olb::IndicatorCuboid3D<T>::IndicatorCuboid3D(olb::Vector<T, 3>, olb::Vector<T, 3>) [with S = double]: Assertion `_xLength>0 && _yLength>0 && _zLength>0′ failed.

    How should I interpret this statement? Has the stl geometry model been imported incorrectly due to an unreasonable scale or location?

    Thank you for your help. Best withes!

    #8674
    Adrian
    Keymaster

    Yes, likely the STL file has a different scaling then the one included with the example. This causes the bounding indicator to be a zero-volume. You can adjust the scaling of a given STL file into SI meters in the reader’s constructor arguments.

    #8679
    Bobbie
    Participant

    Thank you for your answers, Adrian. The geometric model was generated by SW and exported to stl format. The size of the model is 0.15 mm * 0.15 mm * 1 mm. So I followed the example and Users Guide to set the stl unit to 0.001 when importing the stl file,such as follows:

    STLreader<T> stlReader( “multicylinder3d.stl”, converter.getConversionFactorLength(), 0.001 );
    IndicatorLayer3D<T> extendedDomain( stlReader, converter.getConversionFactorLength() );

    Should I adjust the value of 0.001 in above codes or make changes in other locations to prevent the occurrence of the aforementioned issues?

    Thank you for your help again!
    Best wishes!

    • This reply was modified 2 months, 2 weeks ago by Bobbie.
    #8692
    mathias
    Keymaster

    If the units are in mm the factor 0.001 is correct since it scales it to m (which is the SI unit which is always used in OpenLB).

    #8696
    Bobbie
    Participant

    Thank you for your help again!

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