custom STL, rename
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › custom STL, rename
- This topic has 5 replies, 3 voices, and was last updated 3 years ago by mgaedtke.
May 19, 2020 at 1:39 pm #4953
I have created geometry in Blender and exported with STL.
Next, i’ve start to rewrite aorta3D code for my STL.
But the material numbers do not assigning.
The brief verison of code:
T len = 0.0362; T r0= 0.01815; T r1 = 0.01805; ... superGeometry.rename( 0,2,indicator ); superGeometry.rename( 2,1,stlReader ); superGeometry.clean(); Vector<T,3> extend1( 2.*converter.getConversionFactorLength(), len, len ); Vector<T,3> origin1( -r0, -r0, -r0 ); IndicatorCuboid3D<T> cuboidInflow( extend1, origin1 ); //here i had tried 2 for the first parameter, result was not changed superGeometry.rename( 1,3,cuboidInflow ); Vector<T,3> extend2( 2.*converter.getConversionFactorLength(), len, len ); Vector<T,3> origin2( r1-2.*converter.getConversionFactorLength(), -r0, -r0 ); IndicatorCuboid3D<T> cuboidOutflow( extend2, origin2 ); superGeometry.rename( 1,4,cuboidOutflow );
Geometry is the custom porous media.
Console out show this:
... conversionFactorLength = 2e-05 [STLmesh] nTriangles=9030; maxDist2=2.592e-05 [STLmesh] minPhysR(StlMesh)=(-0.0018,-0.0018,-0.0018); maxPhysR(StlMesh)-(0.0018,0.0018,0.0018) [Octree] radios=0.00256; center=(-5e-06,-5e-06,-5e-06) [STLreader] voxelSize=2e-05; stlSize=0.001 [STLreader] minPhysR(VoxelMesh)=(-0.001795,-0.001795,-0.001795); maxPhysR(VoxelMesh)=(0.001785,0.001785,0.001785) ... [SuperGeometryStatistics3D] materialNumber=0; count=1; minPhysR=(0.000825,-0.000455,0.001165); maxPhysR=(0.000825,-0.000455,0.001165) [SuperGeometryStatistics3D] materialNumber=1; count=5812040; minPhysR=(-0.001795,-0.001795,-0.001795); maxPhysR=(0.001785,0.001785,0.001785) [SuperGeometryStatistics3D] materialNumber=2; count=216527; minPhysR=(-0.001815,-0.001815,-0.001815); maxPhysR=(0.001805,0.001805,0.001805) [prepareGeometry] Prepare Geometry ... OK ...
The STL mesh is cube with outside-directional normals with 13 porous cells inside with inside-directional normals. It’s like cube with empty cell’s edges.
I have add the cube there because i do not understand how else i can to do this model.
If it’s necessary, i am able to send the .cpp and .stl files from this project.
May 19, 2020 at 2:07 pm #4955mathiasKeymaster
- This topic was modified 3 years ago by iJokerify. Reason: code mark add
For me the output looks ok. You sould make sure that the stl is watertight and that the resolution requested really resolves the porous media. Best MathiasMay 19, 2020 at 2:15 pm #4956
what means the watertight? The stl haven’t holes on bounds of material ? Or exists some parameter of stl model which applying the watertight property to stl?
iJokerMay 19, 2020 at 2:21 pm #4957
when i increasing resolution, the progress is aborting “Killed” when Voxelizing. It means, there are some limit for resolution ?
May 19, 2020 at 3:17 pm #4959
- This reply was modified 3 years ago by iJokerify.
I still cant to solve my problem. Can i send you photo of stl model and several questions about resolution via mail? I’ll be very grateful!
iJoker.May 19, 2020 at 4:16 pm #4960mgaedtkeKeymaster
I just send you an email.
- You must be logged in to reply to this topic.