|
[Sponsors] |
[waves2Foam] A rectangular box heaving in calm water |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 10 ![]() |
Dear waves2Foamers,
I am trying to run a case where a rectangular box is forced to heave (with a single frequency) in calm water. I use openfoam 2.4.0. The forced motion of the box is realized by using the inherent boundary condition in openfoam - oscillatingDisplacement. The solver for dynamics mesh - "interDyMFoam" is adopted to perform the simulation. In order to calculate the free surface elevation, I add the libarary "libwaves2FoamSampling.so" in the system/controlDict file. Now the problem is described as follows, (1) when I use one core to perform the simulation, I get the correct results for the radiated wave elevation whether or not adding the "libwaves2FoamSampling.so" in system/controlDict. (2) when I use two or more than two cores to run the simulation in parallel, I get the correct results for radiated wave elevation if I did not add the "libwaves2FoamSampling.so" in system/controlDict. (3) when I use two or more than two cores to run the simulation in parallel, I get the wrong results for radiated wave elevation if I add the "libwaves2FoamSampling.so" in system/controlDict. It seems that when using interDyMFoam to run dynamic mesh cases in parallel (using more than one cores), adding the library from waves2Foam - i.e. libwaves2FoamSampling.so will affect the computation and lead to a wrong result. For the specific case, the boundary oscillatingDisplacement is used. Did anyone have similar problems? or Could anyone give some suggestions on this problem? The files for this case is attached. Many thanks Xiantao The University of Western Australia |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 10 ![]() |
The case files are listed as follows:
0/alpha.water FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; /* type waveAlpha; refValue uniform 0; refGrad uniform 0; valueFraction uniform 1; value uniform 0;*/ } bottom { type zeroGradient; } outlet { type zeroGradient; } atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } vessel { type zeroGradient; } frontBack { type empty; } } // ************************************************** *********************** // 0/P_rgh FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } bottom { type zeroGradient; } outlet { type zeroGradient; } atmosphere { type totalPressure; U U; phi phi; rho none; psi none; gamma 1; p0 uniform 0; value uniform 0; } vessel { type zeroGradient; } frontBack { type empty; } } // ************************************************** *********************** // 0/pointDisplacement FoamFile { version 2.0; format ascii; class pointVectorField; location "0"; object pointDisplacement; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 0 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type uniformFixedValue; uniformValue (0 0 0); } bottom { type uniformFixedValue; uniformValue (0 0 0); } outlet { type uniformFixedValue; uniformValue (0 0 0); } atmosphere { type uniformFixedValue; uniformValue (0 0 0); } vessel { type oscillatingDisplacement; amplitude (0 0.04 0); omega 9.90448; value uniform (0 0 0); } frontBack { type empty; } } 0/ U FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform ( 0.0 0.0 0.0); boundaryField { inlet { type fixedValue; value uniform ( 0 0 0 ); /* type waveVelocity; refValue uniform ( 0 0 0 ); refGradient uniform ( 0 0 0 ); valueFraction uniform 1; value uniform ( 0 0 0 ); */ } bottom { type fixedValue; value uniform ( 0 0 0 ); } outlet { type fixedValue; value uniform ( 0 0 0 ); } atmosphere { type pressureInletOutletVelocity; value uniform ( 0 0 0 ); } vessel { type movingWallVelocity; value uniform ( 0 0 0 ); } frontBack { type empty; } } // ************************************************** *********************** // system/controlDict FoamFile { version 2.0; format ascii; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application interDyMFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 2; deltaT 0.001; writeControl adjustableRunTime; writeInterval 0.04; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 0.25; maxAlphaCo 0.25; maxDeltaT 1; libs ( "libwaves2FoamSampling.so" ); functions { #includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName1_controlDict"; #includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName2_controlDict"; } // ************************************************** *********************** // |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,894
Rep Power: 36 ![]() ![]() |
Hi Xiantao,
How do you define right and wrong results? I recall correcting something for moving meshes and surface elevation tool in earlier versions, but I cannot immediately see why results should be affected. You could try to redo the simulations in a more recent version, e.g. 1712 or 1806. OpenFoam 2.4 is getting pretty old by now and many bugs are likely resolved and the functionObject library is completely reimplemented. Also, I am not cross-compiling waves2Foam on such old versions, so compatibility may be compromised in the future. Kind regards Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 10 ![]() |
Hi Niels,
When I said wrong or correct results, I compared the CFD simulated radiated wave elevation with that calculated by linear potential flow method. For using one core, the results of wave elevation calculated using cfd and potential flow agreed with each other quite well. However, for using two or more cores, it was obvious that cfd gave a wrong result, both the amplitude and phase of the radiated wave being wrong (inconsistent with that by potential flow theory or cfd using one core). I am trying to install the version 1712 to see if the problem has been solved. Regards Xiantao The University of Western Australia |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
cem
Join Date: Feb 2021
Posts: 6
Rep Power: 4 ![]() |
Did you also analyze the added mass and damping coefficients?
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,894
Rep Power: 36 ![]() ![]() |
Hi,
This reference might be interesting for you, when it comes to modelling of free decay and the avoidance of contamination from partially reflective boundaries: https://www.researchgate.net/publica...ed_heave_decay Kind regards Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Water diffusion into air | MGabr | CFX | 16 | November 20, 2020 02:35 |
simulation of free falling sphere into calm water? | pedyspider | CFX | 17 | June 25, 2015 12:03 |
Water Evaporation and condensation modeling | Linjie | CFX | 6 | May 24, 2007 15:55 |
Water vapour condensation in CFX-5.7.1 | hdj | CFX | 1 | November 27, 2005 08:15 |
uptodate water distribution network | fredius,magige,tanzanian,(e.a) | Main CFD Forum | 0 | January 27, 2002 08:10 |