CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   OF Multiphase: interFoam-replace DTC Hull STL file with wigley hull (https://www.cfd-online.com/Forums/openfoam-pre-processing/228846-multiphase-interfoam-replace-dtc-hull-stl-file-wigley-hull.html)

zyfsoton July 16, 2020 15:02

OF Multiphase: interFoam-replace DTC Hull STL file with wigley hull
 
1 Attachment(s)
[SIZE="3"][SIZE="3"][SIZE="2"]HI ALL,

Now I am working on interFoam using DTC hull case tutorial. Currently I am trying to replace the DTC HULL with a simpler Wigley hull and then repeat the simulation (RAS-interFoam).

DTC hull and Wigley hull are not in the same size and not in same position, I have maneged to make wigley hull in same scaling and same centre position using 3d builder and meshLab, but it appears erros when i conduct surfaceFeatureExtract, which is attached. Does anyone know how to scale this kind of STL file and make it work?

Btw, both STL files of DTC Hull and wigley hull are from OF resource.

please let me know if you have any hint. Any further discussion will be appreciated!

Many thanks
Tony

Ship Designer August 3, 2020 21:12

Hi Tony,

Judging from the error message it seems that there is an error in the STL file. Have you tried running the surfaceCheck utility on the STL file after modifying it with the programs you've used? As an alternative you could also use OpenFOAM's own surface manipulation tools found in applications/utilities/surface/. If you want to use the Wigley hull within the domain of the DTCHull tutorial, make sure you close the Wigley hull, i.e. add a deck. Otherwise snappyHexMesh won't be able to subtract the hull from the domain because it has no volume. You might also want to have a look at this case with the Wigley hull by WolfDynamics: http://www.wolfdynamics.com/tutorials.html?id=149

zyfsoton December 1, 2020 18:11

1 Attachment(s)
Hi Claudio, many thanks for your reply and that's very helpful. And sorry for the late reply because of focusing on some writing recently.

Now I have fixed this problem, but have another one: after running the ship case using interFoam (I am using OFv6) and I hope to compute the wave profile along the hull (something like the image attached) through paraview. Do you have any idea how to do this? Appreciated if you can share some steps, many thanks! T

zyfsoton December 1, 2020 18:15

1 Attachment(s)
Quote:

Originally Posted by Ship Designer (Post 779526)
Hi Tony,

Judging from the error message it seems that there is an error in the STL file. Have you tried running the surfaceCheck utility on the STL file after modifying it with the programs you've used? As an alternative you could also use OpenFOAM's own surface manipulation tools found in applications/utilities/surface/. If you want to use the Wigley hull within the domain of the DTCHull tutorial, make sure you close the Wigley hull, i.e. add a deck. Otherwise snappyHexMesh won't be able to subtract the hull from the domain because it has no volume. You might also want to have a look at this case with the Wigley hull by WolfDynamics: http://www.wolfdynamics.com/tutorials.html?id=149

Hi Claudio, many thanks for your reply and that's very helpful. And sorry for the late reply because of focusing on some writing recently.

Now I have fixed this problem, but have another one: after running the ship case using interFoam (I am using OFv6) and I hope to compute the wave profile along the hull (something like the image attached) through paraview. Do you have any idea how to do this? Appreciated if you can share some steps, many thanks! T

Ship Designer December 1, 2020 19:17

Hello Tony,

Glad I could help! I never needed to get the wave profile you are looking for but I know they are used to compare measured model test wave profiles with calculated ones. Maybe there's a quicker and more elegnat way to do this in Paraview, but out of my mind my first idea would be like this:
  1. In Paraview, create a filter for the wave elevation surface, Contour by alpha set to 0.5
  2. Make sure only this filter is visible in the pipeline browser, then execute File > Save Data… and export the free surface geometry to an obj or stl file.
  3. Open the hull geometry and import the free surface geometry into a 3D CAD application like Rhino 3D. Make sure the relative positioning to each other is the same as in the CFD domain.
  4. Add transverse (station) planes spaced along the hull length as many as you need points on the plot.
  5. Intersect hull, free surface and transverse planes to obtain intersection points.
  6. Get z-coordinates from points and use them to make the plot in the plot/chart application of your choice.
I haven't tried it so feel free to let me know how this works. Good luck!

Cheers, Claudio


All times are GMT -4. The time now is 15:23.