|
[Sponsors] |
Pressure divergence with floating object (interDyMFoam) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 6, 2021, 12:12 |
Pressure divergence with floating object (interDyMFoam)
|
#1 |
New Member
Florian
Join Date: Apr 2021
Posts: 8
Rep Power: 5 |
Hello,
I want to simulate a floating object with interDyMFoam. For that, I based my files on the tutorial floatingObject (https://github.com/OpenFOAM/OpenFOAM...floatingObject) I wanted to change the dimensions of the mesh and the floater, so I changed blockMeshDict, dynamicMeshDict, topoSetDict and setFieldsDict files only : blockMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // scale 1; X0 0; X1 300; Y0 0; Y1 100; Z0 0; Z1 20; nx 300; ny 100; nz 40; vertices ( ($X0 $Y0 $Z0) ($X1 $Y0 $Z0) ($X1 $Y1 $Z0) ($X0 $Y1 $Z0) ($X0 $Y0 $Z1) ($X1 $Y0 $Z1) ($X1 $Y1 $Z1) ($X0 $Y1 $Z1) ); blocks ( hex (0 1 2 3 4 5 6 7) ($nx $ny $nz) simpleGrading (1 1 1) ); edges ( ); boundary ( inlet { type patch; faces ( (0 4 7 3) ); } outlet { type patch; faces ( (2 6 5 1) ); } stationaryWalls { type wall; faces ( (0 3 2 1) (1 5 4 0) (3 7 6 2) ); } atmosphere { type patch; faces ( (4 5 6 7) ); } floatingObject { type wall; faces (); } ); mergePatchPairs ( ); // ************************************************************************* // dynamicMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object motionProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libsixDoFRigidBodyMotion.so"); motionSolver sixDoFRigidBodyMotion; sixDoFRigidBodyMotionCoeffs { patches (floatingObject); innerDistance 0; outerDistance 4; centreOfMass (150 50 10); // Cuboid dimensions Lx 80; Ly 30; Lz 6; // Density of the solid rhoSolid 500; // Cuboid mass mass #calc "$rhoSolid*$Lx*$Ly*$Lz"; // Cuboid moment of inertia about the centre of mass momentOfInertia #codeStream { codeInclude #{ #include "diagTensor.H" #}; code #{ scalar sqrLx = $Lx*$Lx; scalar sqrLy = $Ly*$Ly; scalar sqrLz = $Lz*$Lz; os << $mass *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0; #}; }; rho rhoInf; rhoInf 1000; report on; accelerationRelaxation 0.95; accelerationDamping 0.95; solver { type Newmark; // type symplectic; // type CrankNicolson; } constraints { // fixedPoint // { // sixDoFRigidBodyMotionConstraint point; // centreOfRotation (0.5 0.45 0.1); // } fixedLine { sixDoFRigidBodyMotionConstraint line; centreOfRotation (150 50 10); direction (0 1 0); } fixedAxis { sixDoFRigidBodyMotionConstraint axis; axis (0 1 1); } } } // ************************************************************************* // topoSetDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name c0; type cellSet; action new; source boxToCell; box (110 35 7) (190 65 13); } { name c0; type cellSet; action invert; } ); // ************************************************************************* // setFieldsDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object setFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue alpha.water 0 volVectorFieldValue U (0 0 0) // volScalarFieldValue p_rgh 0 ); regions ( boxToCell { box (-100 -100 -100) (500 500 10); fieldValues ( volScalarFieldValue alpha.water 1 ); } ); // ************************************************************************* // Unfortunately, with these new dimensions my simulation crashed after less than 1 s. I reduced time step to observe variables evolutions the first 1e-3/1e-2 s : I realized there was a pressure divergence. Indeed, pressure was oscillating between positive and negative value under the floater, and after a certain time values were so huge that simulation stoped. I observed that there was no problem anymore when I reduced the X dimension of the floater (to have a shape closer to a square) and I absolutly don't know why. However, I really wanted to simulate the shape I planed (80*30*6 m^3) So I tried to change mesh dimension, mesh discretization, nCorrectors, nOuterCorrectors but it didn't work. One thing helps me to solve my problem : change some fvScheme solvers : I put Euler instead of CrankNicolson for ddtScheme and Gauss limitedLinearV 1 instead of Gauss vanLeerV for div(rhoPhi,U). I do not know why it worked so if someone has an explanation I would be glade to read it. Now, I'm facing again the same problem : I just wanted to suppress the constraints fixedLine and fixedAxis in dynamicMeshDict file and again, I get pressure oscillations and then divergence. I tried to vary some parameters, without success... You'll find attached some screenshots just before the crash. I also implemented the same model with potentialFreeSurfaceDyMFoam which is a bit similar to interDyMFoam, except there is only one phase (air is not represented). I get exactly the same problem of pressure divergence... I would really appreciate to get some help from someone. Thanks in advance, Florian |
|
November 12, 2023, 09:46 |
|
#2 |
New Member
Kazakis Ioannis
Join Date: Sep 2016
Location: Thessaloniki, Greece
Posts: 24
Rep Power: 10 |
Dear Florian
I have exactly the same Problem. Any suggestions? Regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind tunnel Boundary Conditions in Fluent | metmet | FLUENT | 6 | October 30, 2019 13:23 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
Floating object with 6DoF in InterDyMFoam | wavytracy | OpenFOAM Programming & Development | 2 | November 5, 2010 11:28 |
Compilation error OF1.5-dev on Suse10.3 | darenyang | OpenFOAM Installation | 0 | April 29, 2009 05:55 |
Hydrostatic pressure in 2-phase flow modeling (long) | DS & HB | Main CFD Forum | 0 | January 8, 2000 16:00 |