CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Tip for executing numerous of static drift test in OpenFOAM. (https://www.cfd-online.com/Forums/openfoam-solving/237653-tip-executing-numerous-static-drift-test-openfoam.html)

abeda July 28, 2021 14:57

Tip for executing numerous of static drift test in OpenFOAM.
 
3 Attachment(s)
Hi, foamers

I am about to do one of the PMM tests; static drift test for a ship for different drift angles beta, ranging from 0 degrees to 180 degrees with steps of e.g 15 degrees where water speed is constant e.g 1.75 m/s. This is 12 tests with different angle of attack. Please see attached picure. The boat/hull geometry is an STL file, and I set up an initial domain as shown in "domain with cellzone". I also made a refinement zone in the free surface area (depth = 0 m).

I feel quite lazy today, which made me think: "How can I set up these 12 tests in the best way? Do I really need to do several blockmesh/snappyhexmesh and run?

Here are my options:
  1. Option 1: The gray area is a cellzone, so should I use tabulated6DoFMotion and then set different yaw angles of the hull in a stepwise way from 0 to 180 degrees in 15 deg steps using a slow ramp up time and hold the angle of interest for some time to reach convergence, and then start to ramp up to next angle of interest?
    1. Control cellZone using tabulated6DoFMotion
    2. Allow n number of iterations for convergence
    3. Ramp up to next drift angle of interest slowly (1 deg/min?)
    4. Then keep constant heading
    5. Return to 2 until drift angle has reached 180 degrees.
  2. Option 2: I make a template setup named "static_drift.org" for drift angle = 0 degrees. Then I make a script that does the following:
    1. Copy "static_drift.org" to a "static_drift.run" folder.
    2. Run existing static_drift.run folder.
    3. Retrieve forces from "static_drif.run"/postProcessing folder and copy this to zero_drift folder.
    4. Then I delete static_drift.run folder.
    5. Then I create a new "static_drift.run" folder from copy from static_drift.org"
    6. Transform boat stl by applying "surfaceTransformPoints -rotate-angle '((1 0 0) 15)' static_drift.run/constant/triSurface/boat.stl static_drift.run/constant/triSurface/boat.stl/boat.stl
    7. Do a new blockMesh
    8. Do a new snappyhexmesh
    9. Do a new setFields
    10. Do a new interFoam
    11. Increase drift angle by 15 degrees and return to step 6.

After I have collected forces and moments files I will set them into an excel sheet and make graphs of the forces vs drift angle as shown in the attached "drag Fx by drift angle" image.


Is any of my proposals good?
Is this the way to solve "static_drift" PMM test in CFD?
How do you solve this problems which is so similar to each other?

I appreciate any suggestions and improvements.

Thank you in advance,

Abeda


All times are GMT -4. The time now is 21:19.