|
[Sponsors] |
[Other] Mesh-Morphing with dynamicMotionSolverFvMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 15, 2018, 08:33 |
Mesh-Morphing with dynamicMotionSolverFvMesh
|
#1 |
New Member
Henning Kuchenbuch
Join Date: Jan 2018
Location: Hannover
Posts: 8
Rep Power: 8 |
Hey all,
I'm simulating a floating monopile in a numerical wave tank (to extract its heave- and pitch-motion in different sea states). Therefore I'm using OF-1606+ and waves2Foam with dynamic mesh motion. Below is a coarse example of my mesh. Currently I'm struggeling with a mesh morphing issue: As you can see, there isn't much space between the pile and the bottom wall, so the mesh motion parameters in this direction have to be chosen very precisely. With the dynamicMotionSolverFvMesh I can define different parameters for this in the dynamicMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1606+ | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object motionProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libsixDoFRigidBodyMotion.so"); solver sixDoFRigidBodyMotion; diffusivity quadratic inverseDistance 0.2 ( interface ); sixDoFRigidBodyMotionCoeffs { report on; reportToFile on; solver { type Newmark; } //accelerationDamping 0.9; patches (interface); innerDistance 0.01; outerDistance 0.2; mass 15.7; centreOfMass (0 0 0.298); momentOfInertia (6.34 6.34 2.93); constraints { xAxis { sixDoFRigidBodyMotionConstraint axis; axis (0 1 0); } LineConstraint { sixDoFRigidBodyMotionConstraint line; direction (0 0 1); } } } // ************************************************************************* // I came up with some issues and questions, which google could not answer and I hope some of you can:
Henning |
|
May 12, 2018, 08:20 |
my investigations
|
#2 |
New Member
Henning Kuchenbuch
Join Date: Jan 2018
Location: Hannover
Posts: 8
Rep Power: 8 |
For completeness, if s/o stumbles over the same problems, this i what I found out:
1.) In OF1606+, the diffusion parameter is not looked up, when the solver initializes. As you can see below in sixDoFRigidBodyMotionSolver.H, only "di_" and "do_" matter. It seems that you cannot decide how deformation is diffused through the mesh (it is a cosine-function, as in point 3 pointed out). Code:
[...] /*---------------------------------------------------------------------------*\ Class sixDoFRigidBodyMotionSolver Declaration \*---------------------------------------------------------------------------*/ class sixDoFRigidBodyMotionSolver : public displacementMotionSolver { // Private data //- Six dof motion object sixDoFRigidBodyMotion motion_; wordReList patches_; //- Patches to integrate forces const labelHashSet patchSet_; //- Inner morphing distance (limit of solid-body region) const scalar di_; //- Outer morphing distance (limit of linear interpolation region) const scalar do_; //- Switch for test-mode in which only the // gravitational body-force is applied Switch test_; //- Reference density required by the forces object for // incompressible calculations, required if rhoName == rhoInf scalar rhoInf_; //- Name of density field, optional unless used for an // incompressible simulation, when this needs to be specified // as rhoInf word rhoName_; //- Current interpolation scale (1 at patches, 0 at distance_) pointScalarField scale_; //- Current time index (used for updating) label curTimeIndex_; // Private Member Functions //- Disallow default bitwise copy construct sixDoFRigidBodyMotionSolver ( const sixDoFRigidBodyMotionSolver& ); //- Disallow default bitwise assignment void operator=(const sixDoFRigidBodyMotionSolver&); public: //- Runtime type information TypeName("sixDoFRigidBodyMotion"); // Constructors //- Construct from polyMesh and IOdictionary sixDoFRigidBodyMotionSolver ( const polyMesh&, const IOdictionary& dict ); //- Destructor ~sixDoFRigidBodyMotionSolver(); // Member Functions //- Return point location obtained from the current motion field virtual tmp<pointField> curPoints() const; //- Solve for motion virtual void solve(); //- Write state using given format, version and compression virtual bool writeObject ( IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp ) const; //- Read dynamicMeshDict dictionary virtual bool read(); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // [...] 3.) The mesh motion is diffused isotropic through the mesh. You can check this in the according function in sixDoFRigidBodyMotionSolver.C, where the relative distance between di and do is calculated (1 to 0) and put into a cosine function. If anybody has enough C++-skills to improve this code in such a way that one can set up a three-dimensional vector for di and do and the solver calculates the mesh motion direction-dependent, I would really appreciate it. I could not figure out, how to address vectorial objects in C++ . Code:
[...] // Calculate scaling factor everywhere // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ { const pointMesh& pMesh = pointMesh::New(mesh); pointPatchDist pDist(pMesh, patchSet_, points0()); // Scaling: 1 up to di then linear down to 0 at do away from patches scale_.internalField() = min ( max ( (do_ - pDist.internalField())/(do_ - di_), scalar(0) ), scalar(1) ); // Convert the scale function to a cosine scale_.internalField() = min ( max ( 0.5 - 0.5 *cos(scale_.internalField() *Foam::constant::mathematical::pi), scalar(0) ), scalar(1) ); pointConstraints::New(pMesh).constrain(scale_); scale_.write(); } [...] Furthermore, according to snappyHexMesh, increasing the nCellsBetweenLevels from 3 to 10 and reducing all parameters in the snapControls to a minimum helped also a lot. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1606+ | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; limitedGrad cellLimited Gauss linear 1; } divSchemes { default none; div(phi,U) Gauss upwind; div(rhoPhi,U) Gauss upwind; //Gauss linearUpwind grad(U) div(phi,alpha) Gauss upwind; //Gauss vanLeer; div(phirb,alpha) Gauss upwind; //Gauss interfaceCompression; Gauss linear; schlechter div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } // ************************************************************************* // Greetings, Henning |
|
Tags |
dynamicmotionsolverfvmesh, mesh, morphing, sixdofrigidbodymotion |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] 2D hybrid mesh (unstructured mesh highly dependent on structured mesh parameters) | shubham jain | ANSYS Meshing & Geometry | 1 | April 10, 2017 06:03 |
[snappyHexMesh] Snappyhex mesh: poor inlet mesh | Swagga5aur | OpenFOAM Meshing & Mesh Conversion | 1 | December 3, 2016 17:59 |
[ICEM] Generating Mesh for STL Car in Windtunnel Simulation | tommymoose | ANSYS Meshing & Geometry | 48 | April 15, 2013 05:24 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 10:03 |
Mesh Morphing in CFX ??? | vmlxb6 | CFX | 10 | March 9, 2011 15:59 |