CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

moveDynamicMesh wrong mesh for terrain modification

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By pardoa

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2014, 08:09
Default moveDynamicMesh wrong mesh for terrain modification
  #1
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
Hi all,

Buid: 1.6-ext-959ec266ba5c
Solver: moveDynamicMesh

I have tried several motion solvers and always always I obtain a bad mesh from first iteration so something must be wrong from the beginning and I can not find the problem.

dynamicMeshDict
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.2                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      dynamicMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");
motionSolverLibs ("libcellDecompositionMotionSolver.so");

//solver displacementSBRStress;   //displacementLaplacian;
//solver velocityComponentLaplacian z;

//solver laplaceCellDecomposition;

solver velocityLaplacian;

diffusivity  quadratic inversePointDistance 1(bottom);

//diffusivity banana;

frozenDiffusion off;

distancePatches
( 
bottom
);

/*displacementSBRStressCoeffs
{
    // diffusivity  uniform;
    // diffusivity  directional (1 200 0);
    // diffusivity  motionDirectional (1 1000 0);
    // diffusivity  file motionDiffusivity;
    diffusivity  quadratic inverseDistance 1(bottom);
}

// ************************************************************************* //
pointMotionU includes the vertical distance ( 0 0 distance) between vertex of faces of the bottom patch to the real stl geometry. It has been calculated previously.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM Extend Project: Open source CFD        |
|  \\    /   O peration     | Version:  1.6-ext                               |
|   \\  /    A nd           | Web:      www.extend-project.de                 |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       pointVectorField;
    location    "1";
    object      Udist;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 0 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    side3
    {
        type            slip;
    }
    side1
    {
        type            slip;
    }
    side2
    {
        type            slip;
    }
    side4
    {
        type            slip;
    }
    bottom
    {
        type            fixedValue;
        value           nonuniform ( 
(0 0 375.797)
(0 0 376.355)
(0 0 376.763)
(0 0 377.228)
(0 0 377.773)
...
Surface Mesh is ok but I obtain always negative cells and so because first cells are not moved.

When using laplaceCellDecomposition, I create a motionU field where for the patch is needed to impose the vertex and face centre displacement field. I have calculated the distance between vertex of faces of the patch to the stl and distance from face centre of the patch to the stl.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM Extend Project: Open source CFD        |
|  \\    /   O peration     | Version:  1.6-ext                               |
|   \\  /    A nd           | Web:      www.extend-project.de                 |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       tetPointVectorField;
    location    "1";
    object      Udist;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 0 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    side3
    {
        type            slip;
    }
    side1
    {
        type            slip;
    }
    side2
    {
        type            slip;
    }
    side4
    {
        type            slip;
    }
    bottom
    {
        type            fixedValue;
        value           nonuniform ( 
(0 0 375.797)
(0 0 376.355)
(0 0 376.763)
(0 0 377.228)
....
Here is some part of the output file of the simulation:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create dynamic mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: velocityLaplacian
Selecting motion diffusion: quadratic
Selecting motion diffusion: inverseDistance
Time = 1
DICPCG:  Solving for cellMotionUx, Initial residual = 1, Final residual = 5.88085e-05, No Iterations 1
DICPCG:  Solving for cellMotionUy, Initial residual = 1, Final residual = 5.37124e-05, No Iterations 1
DICPCG:  Solving for cellMotionUz, Initial residual = 1, Final residual = 9.71784e-05, No Iterations 1
volume continuity errors : volume = 1.22183e+12, old volume = 1.3896e+12, max error = 9.31323e-09, sum local = 6.84765e-15, global = 2.83277e-17
    Point usage OK.
    Upper triangular ordering OK.
    Topological cell zip-up check OK.
    Face vertices OK.
    Face-face connectivity OK.
    Mesh topology OK.
    Boundary openness (1.69157e-19 5.56167e-18 4.51055e-13) Threshold = 1e-06 OK.
 ***High aspect ratio cells found, Max aspect ratio: 1.19514e+14, number of cells 508118 Threshold = 1000
    Minumum face area = 0.000407749. Maximum face area = 223271.  Face area magnitudes OK.
 ***Zero or negative cell volume detected.  Minimum negative volume: -674665, Number of negative volume cells: 508072
    Mesh non-orthogonality Max: 179.999 average: 77.1779 Threshold = 70
   *Number of severely non-orthogonal faces: 78863.
 ***Number of non-orthogonality errors: 1541036.
 ***Error in face pyramids: 3065841 faces are incorrectly oriented.
 ***Max skewness = 125155, 9521 highly skew faces detected Threshold = 4
    Failed 5 mesh geometry checks.
    Failed 1 mesh checks.
ExecutionTime = 72.91 s  ClockTime = 77 s
Using solver displacementLaplacian, generating the pointDisplacement file:
Code:
Create time

Create dynamic mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: displacementLaplacian
Selecting motion diffusion: quadratic
Selecting motion diffusion: inverseDistance
Time = 1
GAMG:  Solving for cellDisplacementx, Initial residual = 1, Final residual = 1.19725e-09, No Iterations 5
GAMG:  Solving for cellDisplacementy, Initial residual = 1, Final residual = 8.85574e-10, No Iterations 5
GAMG:  Solving for cellDisplacementz, Initial residual = 1, Final residual = 1.04615e-09, No Iterations 3
volume continuity errors : volume = 1.22183e+12, old volume = 1.3896e+12, max error = 1.45519e-09, sum local = 6.65964e-15, global = 3.49921e-17
    Point usage OK.
    Upper triangular ordering OK.
    Topological cell zip-up check OK.
    Face vertices OK.
    Face-face connectivity OK.
    Mesh topology OK.
    Boundary openness (-4.54089e-17 -2.27977e-18 4.52428e-13) Threshold = 1e-06 OK.
 ***High aspect ratio cells found, Max aspect ratio: 1.01474e+14, number of cells 15544 Threshold = 1000
    Minumum face area = 0.000657964. Maximum face area = 176660.  Face area magnitudes OK.
 ***Zero or negative cell volume detected.  Minimum negative volume: -329035, Number of negative volume cells: 15536
    Mesh non-orthogonality Max: 179.952 average: 21.6289 Threshold = 70
   *Number of severely non-orthogonal faces: 36111.
 ***Number of non-orthogonality errors: 46875.
 ***Error in face pyramids: 101385 faces are incorrectly oriented.
 ***Max skewness = 21738.6, 5074 highly skew faces detected Threshold = 4
    Failed 5 mesh geometry checks.
    Failed 1 mesh checks.
I have also followed the tutorial of SnakeRiver Canyon and it also give me a bad results. Maybe diffusivity field is not calculated correctly?
be_inspired is offline   Reply With Quote

Old   November 10, 2020, 10:18
Default
  #2
New Member
 
pardoa
Join Date: May 2018
Posts: 29
Rep Power: 8
pardoa is on a distinguished road
Hello be_inspired,

Did you finally find a solution for your problem? I'm currently facing the same sort of issues.

Thanks!
Álvaro
ffarella likes this.
pardoa is offline   Reply With Quote

Old   January 29, 2021, 17:13
Default Sama sama ...
  #3
New Member
 
fabien farella
Join Date: Mar 2016
Posts: 2
Rep Power: 0
ffarella is on a distinguished road
Same problem here? Did anyone solve this problem?

Last edited by ffarella; February 7, 2021 at 13:25.
ffarella is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Mirror Mesh | Delete duplicate mesh pythag0ra5 ANSYS Meshing & Geometry 6 November 19, 2013 08:35
[snappyHexMesh] Layers:problem with curvature giulio.topazio OpenFOAM Meshing & Mesh Conversion 10 August 22, 2012 10:03
(Dynamic) Mesh Modification Mr. Joe Fluent UDF and Scheme Programming 3 March 24, 2010 21:31
[blockMesh] Mesh containing 9 blocks Whats wrong sega OpenFOAM Meshing & Mesh Conversion 14 July 26, 2008 08:49
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


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