|
[Sponsors] |
December 2, 2019, 21:51 |
Import bathymetry to OpenFOAM
|
#1 |
New Member
Peida Han
Join Date: Nov 2019
Location: Beijing, China
Posts: 6
Rep Power: 6 |
Dear all,
Nice to see you guys, I’m a new user and I have a terrain .txt file. I would like to mesh that. I used this terrain meshing tutorial: tutorials/mesh/moveDyamicMesh/SnakeRiverCanyon. Firstly, I used MeshLab to convert my .txt file (3 colume, x-coordinate, y-coordinate and height) into .stl file, then I modified the tutorial to generate the mesh. But it seems that the mesh is weird with sharp edge, and OF shows that the geometry check is failed. Here is my result and my code. Thanks a lot and look forward to you reply lol (Result when I run SnakeRiverCanyon, show Time=1 for example) Time = 1 surfaceDisplacement : on patch minZ did not project 3 out of 40401 points. GAMG: Solving for cellDisplacementx, Initial residual = 1, Final residual = 8.64577e-09, No Iterations 9 GAMG: Solving for cellDisplacementy, Initial residual = 1, Final residual = 3.93566e-09, No Iterations 10 GAMG: Solving for cellDisplacementz, Initial residual = 1, Final residual = 7.4888e-09, No Iterations 8 Point usage OK. Upper triangular ordering OK. Topological cell zip-up check OK. Face vertices OK. Face-face connectivity OK. Mesh topology OK. Boundary openness (-8.37097e-19 -3.83493e-19 -3.45847e-15) OK. ***High aspect ratio cells found, Max aspect ratio: 1.20381e+106, number of cells 183 Minimum face area = 0.00609877. Maximum face area = 8965.54. Face area magnitudes OK. ***Zero or negative cell volume detected. Minimum negative volume: -5266.04, Number of negative volume cells: 183 Mesh non-orthogonality Max: 179.979 average: 3.31798 *Number of severely non-orthogonal (> 70 degrees) faces: 2268. ***Number of non-orthogonality errors: 603. ***Error in face pyramids: 1449 faces are incorrectly oriented. ***Max skewness = 584.992, 56 highly skew faces detected which may impair the quality of the results Failed 5 mesh geometry checks. Failed 1 mesh checks. ExecutionTime = 14.58 s ClockTime = 15 s Last edited by Peida; December 3, 2019 at 13:01. Reason: something unclear |
|
December 2, 2019, 21:52 |
|
#2 |
New Member
Peida Han
Join Date: Nov 2019
Location: Beijing, China
Posts: 6
Rep Power: 6 |
I feel like my problem results from .stl file.
Firstly, I generate my .stl file from XYZ.file (x coordinate, y coordinate and height) by Meshlab . Then I run my case modified by Snakeriver and the result is not good (the bottom of block moves to stl surface but sharp edge appears.) so I try to convert .stl file by Matlab, the code shows below: [X,Y,Z]=textread('AcrossRiver.txt','%f %f %f'); % triangulate in xy T = delaunay(X,Y); % create triangulation in 3d tri = triangulation(T,X,Y,Z); % plot patch('Faces',tri.ConnectivityList,'Vertices',tri. Points,'FaceColor','red'); % now save stlwrite(tri,'jisadas.stl'); The result gets better, the show time of the sharp edge delays. But it still shows up. Last edited by Peida; December 3, 2019 at 12:46. |
|
December 2, 2019, 21:53 |
|
#3 |
New Member
Peida Han
Join Date: Nov 2019
Location: Beijing, China
Posts: 6
Rep Power: 6 |
So I wonder that if there is anyway to generate high-quality .stl file.
And here is my .stl file Oops, it‘s too big... Last edited by Peida; December 3, 2019 at 13:02. |
|
December 4, 2019, 18:49 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
- if you have CAD file of the geometry, instead of STL, use SALOME or Blender to create surface mesh, i.e. STL
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
December 5, 2019, 09:44 |
|
#5 | |
New Member
Peida Han
Join Date: Nov 2019
Location: Beijing, China
Posts: 6
Rep Power: 6 |
Quote:
Thanks for your suggestion. I have CAD and I wonder that what is SALOME or Blender, utilities in OF? And I have figured out my problem: If you use moveDynamic turorial, you should care the ratio of the xyz resolution. If z-resolution is too low, the result will get bad. Peida |
||
May 4, 2020, 12:55 |
Bathymetry and OpenFOAM
|
#6 |
New Member
Join Date: Oct 2010
Posts: 21
Rep Power: 16 |
Glad you managed to resolve your issues, Peida.
The STL attached was generated using a combination of SALOME and MeshLAB. It was then used for a littoral flow study using OpenFOAM: https://www.mts-cfd.com/loch-erisort Best wishes, Tom |
|
Tags |
terrain mesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to import single STL file to openfoam in Windows 10 | Jinjolee | OpenFOAM Pre-Processing | 9 | May 19, 2023 11:03 |
how to import the CAD drawing into openfoam | shadyenany | OpenFOAM | 9 | March 22, 2021 12:26 |
OpenFOAM 4.0 Released | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 2 | October 6, 2017 06:40 |
[Commercial meshers] import ansys meshing to openfoam | bhrz | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2014 12:41 |
Did anyone worked on GID mesh import in OpenFoam?? | Tushar@cfd | OpenFOAM | 2 | May 31, 2011 13:01 |