CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [waves2Foam] Coupling OCW3D with wave2foam (https://www.cfd-online.com/Forums/openfoam-community-contributions/242225-coupling-ocw3d-wave2foam.html)

Poefke April 11, 2022 10:16

Coupling OCW3D with wave2foam
 
Dear Openfoam users,

I had a question about the Openfoam oceanwave3D coupling. First some background information! I'm currently doing my thesis on wave breaking in wave2Foam coupled with oceanwave3D. So my work procedure is as follows:

-> Generate 3-hour design storm in OCW3D
-> Analyse data and select wave at certain time
-> create new folder and copy oceanwave3D.input to that folder
-> Create domain and input parameters wave2foam, for example
time is between 8500s ~ 8600s and external sourcing OCW3D
-> run wave2foam with blockMesh -> setwaveField

Now openfoam runs OCW3D first to set the wave field at 8500 s as first input step for wave2Foam by writing an oceanwave3D.end file combined with the fortran files (fortran.000936 for example). After these are generated the following commands are done to run the simulation:

->relaxationZoneLayout -> waveFoam
-> analyse data.

The problem lies in the fact that it takes quite some time to run OCW3D to get to 8500 seconds and OCW3D only writes and oceanwave3D.end file for the last time step but i need the end file to be at time step 8500 seconds so i can do a hot start and don't have to do the OCW3D simulation all over again. Openfoam is able to write hotstart files from OCW3D as can be seen from the manual:

4.3.3.1 Output
The output from OceanWave3D consists of three elements:

* Kinematics* and *.fort files. The output in these files cannot be used, because the time
stepping is controlled by OpenFoam, hence the time stamps on these files are wrong.

* waveGauges.dat contains ASCII-formatted wave gauge data, which comes in the same
format as that for the standard surfaceElevation data in waves2Foam. The time stamp is
correct.

* Hot-start files are written in synchronisation with the OpenFoam results. The files are outputted
to the folder <casePath>/OCW3Dhotstart. The naming convection is OceanWave3D.-
<timeIndex>, where <timeIndex> is the time index in the OpenFoam simulation. This
index can be retrieved in the file <timeName>/uniform/time.


Is there a way to get a hotstart file at for example 8500 s? as openfoam is able to do it in some way or could i convert a fortran file into a .end file?

Thanks for reading and I hope someone can answer my question!

Greetings, David


All times are GMT -4. The time now is 10:25.