
[Sponsors] 
August 9, 2021, 01:21 
Supercavitation / overPimpleDyMFoam

#1 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
Dear Foamers,
A cylinder fast moving in water with 500 m/s. We would like to see the cavity around cylinder. 1. Can we solve this problem with overPimpleDyMFoam? 2. Do we need to use Volume Of Fluid (VOF) Technic? 3. Can we use alpha.water with overPimpleDyMFoam? Any answer will be appreciated. Thanks & regards. 

August 12, 2021, 18:40 
overPimpleDyMFoam + VoF

#2 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
Can we use Volume of Fluid (VoF) Technique with overPimpleDyMFoam solver?


August 13, 2021, 03:21 

#3 
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20 
No you can't, you need to use overInterDyMFoam, which is the overset version of interFoam (VOF)
I'm not sure it can handle cavitation though. There is a specific solver for this: cavitatingFoam. But it doesn't have an overset version. Yann 

August 14, 2021, 00:51 

#4 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
Thank you very much Yann.
Can we use 6DOF with overInterDyMFoam? Can we use PISO with overInterDyMFoam? 

August 16, 2021, 03:36 

#5 
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20 
Hi Senel,
Yes you can use both. Have a look at the floatinBody tutorial to have an example of 6DoF with overInterDyMFoam. Regards, Yann 

August 16, 2021, 05:22 

#6 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
Hi Yann,
Thank you for your reply. I tried floating object that you have pointed and get the following error. I have seen this error several times when I try to work with floatingobject in local tutorial folder: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Using #codeStream at line 44 in file "D:/___OpenFOAM/openfoammastertutorialsmultiphaseoverInterDyMFoamfloatingBody/tutorials/multiphase/overInterDyMFoam/floatingBody/background/constant/dynamicMeshDict.sixDoFRigidBodyMotionCoeffs" > FOAM FATAL IO ERROR: (openfoam2012) This code should not be executed by someone with administrator rights for security reasons. It generates a shared library which is loaded using dlopen file: D:/___OpenFOAM/openfoammastertutorialsmultiphaseoverInterDyMFoamfloatingBody/tutorials/multiphase/overInterDyMFoam/floatingBody/background/constant/dynamicMeshDict.sixDoFRigidBodyMotionCoeffs at line 26. From static void Foam::dynamicCode::checkSecurity(const char*, const Foam::dictionary&) in file db/dynamicLibrary/dynamicCode/dynamicCode.C at line 71. FOAM exiting Do you know how can I solve this? Regards, Senel 

August 16, 2021, 05:26 

#7 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
I use Windows.
There is other floatingobject case without 6DOF. I dont face the error above for that one without 6DOF. Only the case including 6DOF gives this error. 

August 16, 2021, 06:06 

#8 
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20 
The error is due to the #codeStream function defined in background/constant/dynamicMeshDict.
This function is used to compute the moment of inertia of the object according to the dimensions Lx, Ly, Lz and mass defined beforehand. You get this error because codeStream dynamically compile some code to compute these values and you are not allowed to compile code with the Windows version. I guess you are using the crosscompiled windows binaries (mingw) ? However, you don't have to use the dynamic code function. You can remove it and compute the moment of inertia yourself in order to run the tutorial with your current setup. Cheers, Yann 

August 16, 2021, 07:51 

#9 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
I guess I use mingw: OpenFOAMMSDOSPrompt.bat
I deleted the block: /* momentOfInertia #codeStream { ... ... } */ but same error occurred. I deleted dynamicMeshDict file and run overInterDyMFoam solver again, the result was same. I tried interFoam solver to run, same error This code should not be executed by someone with administrator rights for security reasons. 

August 16, 2021, 08:42 

#10 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
with the interFoam solver run, the error is different :
Unknown asymetric matrix solver type PCG. 

August 16, 2021, 09:04 

#11 
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20 
You get this error because there is dynamic code elsewhere in the case.
In the background/system/controlDict, you have to delete the coded function object alphaVol. By the way, you can't delete the momentOfInertia block in dynamicMeshDict because the sixDoF model needs the moment of inertia of the object to compute its displacement. You have to define it using this syntax: Code:
momentOfInertia (Ix Iy Iz); 

August 16, 2021, 11:29 

#12 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
Yes, I put momentOfInertia(Ix Iy Iz);
I did what you suggested. It worked for 45 minutes but failed somehow. I attached the console messages. I would appriciate if you can suggest me to correct this. Other question, there are very big numbers of angular velocity inside the messages. How did I get this? I have checked the input files and could not see any velocity (linear or angular) values. 

August 16, 2021, 12:20 

#13  
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20 
Quote:
So maybe the wrong moment of inertia? What values did you use? Have you modified other parameters? It seems you did not post the log files so I cannot really help more than this for now. Yann 

August 16, 2021, 13:22 

#14 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
I used:
momentOfInertia(4.45E16 4.45E16 2.25E16); It seems attachment is lost. Let me paste in 3 parts. 

August 16, 2021, 13:24 

#15 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
D:\___OpenFOAM\AAB\background>overInterDyMFoam
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: v2012   \\ / A nd  Website: www.openfoam.com   \\/ M anipulation   \**/ Build : 79e353b84e20201222 OPENFOAM=2012 Arch : "LSB;label=32;scalar=64" Exec : overInterDyMFoam Date : Aug 16 2021 Time : 18:03:07 Host : DESKTOPK454CLA PID : 15108 I/O : uncollated Case : D:/___OpenFOAM/AAB/background nProcs : 1 trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20) allowSystemOperations : Allowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Selecting dynamicFvMesh dynamicOversetFvMesh Selecting motion solver: sixDoFRigidBodyMotion Applying solid body motion to entire mesh Selecting sixDoFSolver Newmark Translational constraint tensor (0 0 0 0 0 0 0 0 1) Rotational constraint tensor (1 0 0 0 1 0 0 0 1) PIMPLE: no residual control data found. Calculations will employ 2 corrector loops Reading field p_rgh Reading field U Reading/calculating face flux field phi Creating cellMask field to block out hole cells Creating interpolatedCells field Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type RAS Selecting RAS turbulence model kEpsilon RAS { RASModel kEpsilon; turbulence on; printCoeffs on; Cmu 0.09; C1 1.44; C2 1.92; C3 0; sigmak 1; sigmaEps 1.3; } Reading g Reading hRef Calculating field g.h No MRF models present No finite volume options present DICPCG: Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0 Reading/calculating face velocity Uf Courant Number mean: 0 max: 0 Starting time loop Courant Number mean: 0 max: 0 Interface Courant Number mean: 0 max: 0 deltaT = 0.00119904076739 Time = 0.00119904 PIMPLE: iteration 1 forces forces: rho: rho Not including porosity effects 6DoF rigid body motion Centre of rotation: (0.5 0.5 0.299996831223) Centre of mass: (0.5 0.5 0.299996831223) Orientation: (1 1.63669391233e09 2.95550669418e09 1.63669394173e09 1 9.95020585532e09 2.9555066779e09 9.95020586016e09 1) Linear velocity: (0 0 0.00528551978417) Angular velocity: (1.65969433687e05 4.92978515903e06 2.73000547029e06) cellVolumeWeight : detected 1 mesh regions zone:0 nCells:513344 Marking patchcells on zone 0 After patch analysis : nCells : 513344 other : 466972 patch : 36464 overset: 9908 cellVolumeWeight : detected 3 mesh regions after overset Front : fraction:1 size:19824 Overset analysis : nCells : 513344 calculated : 494480 interpolated : 8956 hole : 9908 Execution time for mesh.update() = 5.936 s smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 DILUPBiCGStab: Solving for p_rgh, Initial residual = 1, Final residual = 0.00760596752673, No Iterations 16 time step continuity errors : sum local = 1.06238437225e09, global = 1.03013829106e09, cumulative = 1.03013829106e09 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.0524625804512, Final residual = 8.78548417131e10, No Iterations 40 time step continuity errors : sum local = 7.91020323273e16, global = 1.28535149463e17, cumulative = 1.03013830391e09 smoothSolver: Solving for epsilon, Initial residual = 0.00743570667599, Final residual = 9.00841209398e10, No Iterations 3 smoothSolver: Solving for k, Initial residual = 0.999999999863, Final residual = 7.66652009867e09, No Iterations 4 PIMPLE: iteration 2 smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.0232907830062, Final residual = 0.000205887888379, No Iterations 6 time step continuity errors : sum local = 1.68756915319e10, global = 1.45081102075e10, cumulative = 8.85057201837e10 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.000781904793653, Final residual = 8.93768281698e10, No Iterations 30 time step continuity errors : sum local = 7.28211539113e16, global = 1.09868682489e16, cumulative = 8.85057091968e10 smoothSolver: Solving for epsilon, Initial residual = 0.00446626862604, Final residual = 2.42417052886e10, No Iterations 3 smoothSolver: Solving for k, Initial residual = 0.012986580111, Final residual = 2.5960091425e09, No Iterations 3 ExecutionTime = 33.981 s ClockTime = 34 s Courant Number mean: 1.55487331975e05 max: 0.000455624445287 Interface Courant Number mean: 0 max: 0 deltaT = 0.0014374667413 Time = 0.00263651 PIMPLE: iteration 1 forces forces: rho: rho Not including porosity effects 6DoF rigid body motion Centre of rotation: (0.5 0.5 0.299980125162) Centre of mass: (0.5 0.5 0.299980125162) Orientation: (0.776270683644 0.526128983104 0.347263759775 0.33437062227 0.123350716039 0.9343344625 0.534415674057 0.841411251405 0.0801685308076) Linear velocity: (0 0 0.0179582331751) Angular velocity: (939184.683697 563475.839125 1222759.66172) cellVolumeWeight : detected 1 mesh regions zone:0 nCells:513344 Marking patchcells on zone 0 After patch analysis : nCells : 513344 other : 466972 patch : 36464 overset: 9908 cellVolumeWeight : detected 3 mesh regions after overset Front : fraction:1 size:19824 Overset analysis : nCells : 513344 calculated : 494480 interpolated : 8956 hole : 9908 Execution time for mesh.update() = 6.103 s smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.99995375697, Final residual = 0.00845346027011, No Iterations 13 time step continuity errors : sum local = 0.000125286431428, global = 3.75043913352e05, cumulative = 3.75052763923e05 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.380097852649, Final residual = 9.57548068101e10, No Iterations 44 time step continuity errors : sum local = 4.68802909906e11, global = 3.51268570072e12, cumulative = 3.75052728796e05 smoothSolver: Solving for epsilon, Initial residual = 0.695972178136, Final residual = 6.63798287942e09, No Iterations 25 smoothSolver: Solving for k, Initial residual = 0.999651749679, Final residual = 7.61925327133e09, No Iterations 25 PIMPLE: iteration 2 smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.266825331208, Final residual = 0.00249242465244, No Iterations 8 time step continuity errors : sum local = 8.09936168876e05, global = 2.49451130953e05, cumulative = 6.24503859749e05 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.0843161322737, Final residual = 7.27528717452e10, No Iterations 37 time step continuity errors : sum local = 3.64109208287e11, global = 4.89648251891e12, cumulative = 6.24503908714e05 smoothSolver: Solving for epsilon, Initial residual = 0.102619751728, Final residual = 7.78687600509e09, No Iterations 48 smoothSolver: Solving for k, Initial residual = 0.970662778002, Final residual = 9.82883850463e09, No Iterations 565 ExecutionTime = 70.221 s ClockTime = 71 s Courant Number mean: 2.00725072574 max: 63.2786470141 Interface Courant Number mean: 0 max: 0 deltaT = 3.40753283428e05 Time = 0.00267058 PIMPLE: iteration 1 forces forces: rho: rho Not including porosity effects 6DoF rigid body motion Centre of rotation: (0.5 0.5 0.299979528033) Centre of mass: (0.5 0.5 0.299979528033) Orientation: (0.387102407007 0.888790223757 0.245364350799 0.750311018546 0.148981319873 0.64407914248 0.53589654033 0.433424162319 0.724540125583) Linear velocity: (0 0 0.0170893800223) Angular velocity: (489835497119 1.43832612225e+13 1.17263307329e+13) cellVolumeWeight : detected 1 mesh regions zone:0 nCells:513344 Marking patchcells on zone 0 After patch analysis : nCells : 513344 other : 466972 patch : 36464 overset: 9908 cellVolumeWeight : detected 3 mesh regions after overset Front : fraction:1 size:19824 Overset analysis : nCells : 513344 calculated : 494480 interpolated : 8956 hole : 99087 

August 16, 2021, 13:26 

#16 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
PIMPLE: iteration 1
forces forces: rho: rho Not including porosity effects 6DoF rigid body motion Centre of rotation: (0.5 0.5 0.30232338962) Centre of mass: (0.5 0.5 0.30232338962) Orientation: (0.876768506551 0.369453376802 0.307865536054 0.118119048666 0.785996218752 0.606842512065 0.466181162492 0.495695618779 0.732776212264) Linear velocity: (0 0 2.58474731002e+41) Angular velocity: (8.40530353751e+56 3.0199876719e+57 3.54845284751e+57) cellVolumeWeight : detected 1 mesh regions zone:0 nCells:513344 Marking patchcells on zone 0 After patch analysis : nCells : 513344 other : 466972 patch : 36464 overset: 9908 cellVolumeWeight : detected 3 mesh regions after overset Front : fraction:1 size:19824 Overset analysis : nCells : 513344 calculated : 494480 interpolated : 8956 hole : 9908 Execution time for mesh.update() = 6.128 s smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 smoothSolver: Solving for alpha.water, Initial residual = 0, Final residual = 0, No Iterations 0 Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 MULES: Correcting alpha.water MULES: Correcting alpha.water MULES: Correcting alpha.water Phase1 volume fraction = 0 Min(alpha.water) = 0 Max(alpha.water) = 0 DILUPBiCGStab: Solving for p_rgh, Initial residual = 0.000758763959602, Final residual = 5.95872807485e06, No Iterations 4 time step continuity errors : sum local = 9.48505988825e08, global = 5.95306438863e08, cumulative = 2.00122928483e+20 DILUPBiCGStab: Solving for p_rgh, Initial residual = 6.32441617964e58, Final residual = 6.32441617964e58, No Iterations 0 time step continuity errors : sum local = 1.66080050762e+29, global = 8.6938078679e+14, cumulative = 2.00123797864e+20 smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.999999998127, No Iterations 1000 smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.923117714442, No Iterations 1000 D:\___OpenFOAM\AAB\background> 

August 17, 2021, 05:01 

#17 
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20 
Hi,
how did you compute your moment of inertia? The values you used seem quite low. I end up with these values: Code:
momentOfInertia (0.2924544 0.2924544 0.1548288); Cheers, Yann 

August 17, 2021, 10:16 

#18 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
I've taken the dimensions of the floatingobject from paraview as 0.24 mm x 0.24 mm x 0.4 mm and draw a solid in CATIA. Now I remember I forget to change the density I think the default density is 1000 kg/m3 which is the same with water. Maybe thats the reason I end up with a very small moment values.


August 17, 2021, 10:36 

#19 
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 629
Rep Power: 20 
OK I get it now. The dimensions of the object are in meters and not millimeters: 0.24m x0.24m x 0.4m.
This is why you get very small inertia values, in addition to the wrong density. By the way, both dimensions and density of the object are specified in the dynamicMeshDict. It should run fine with the correct values. Yann 

August 17, 2021, 17:15 

#20 
New Member
Senel Canik
Join Date: Aug 2021
Posts: 22
Rep Power: 3 
Dear Yann,
It worked fine. Thank you very much for your time and effort. You are very helpful. Using 0.24m x 0.24m x 0.4m and 700 kg/m3, I found same moment of inertia. Floatingobject is very nice application of: Dynamic mesh Overset mesh 6DOF Volume of Fluid (VoF) in this case water and water vapor PISO My application is a cylinder inside water. The initial velocity is 500 m/s. I recently experienced overInterDyMFoam and interPhaseChangeDyMFoam. But I am not sure wich solver is more suitable for my cylinder application. Any suggestion is welcome. Thx & Regards, Senel 

Tags 
cavitation, overpimpledymfoam, supercavitation, vof 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Can I use OverPimpleDyMFoam and 6DOF rigid body motion at the same time?  SihunLee  OpenFOAM Running, Solving & CFD  1  July 2, 2019 04:01 
what are the best solvers for P, U, cellDisplacement for overPimpleDyMFoam  kimou  OpenFOAM PreProcessing  2  May 23, 2019 05:39 
supercavitation  ALI1  CFX  1  March 22, 2010 14:07 
supercavitation in CFX  Alex  CFX  2  December 18, 2006 23:26 
SUPERCAVITATION  mehrnaz  FLUENT  0  March 16, 2004 08:56 