CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   moveDynamicMesh with dynamicMotionSolverFvMesh (http://www.cfd-online.com/Forums/openfoam-solving/98705-movedynamicmesh-dynamicmotionsolverfvmesh.html)

gfilip March 16, 2012 14:32

moveDynamicMesh with dynamicMotionSolverFvMesh
 
Hello,

I want to use moveDynamicMesh to give initial conditions (rotation, for example) of a floating object (taken from the interDyMFoam tutorial). I then want to solve for the motion using dynamicMotionSolverFvMesh tools. I have been able to use moveDynamicMesh in combination with solidBodyMotionFvMesh, but I am not sure how to go about using it in the case of a deforming mesh.

Any hints?

Thanks

samiam1000 May 16, 2012 04:40

Have you reached your goals? Are you still working on this problem?

Thanks a lot,

Samuele

gfilip May 16, 2012 17:33

Hi Samuele,

Yes, I figured it out. A sample dynamicMeshDict would look like:
Code:

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

dynamicFvMesh      dynamicMotionSolverFvMesh;

twoDMotion yes; //optional

motionSolverLibs ("libfvMotionSolvers.so");

solver displacementSBRStress;
diffusivity  quadratic inverseDistance 1(wall);

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

and then you need a pointDisplacement file in the 0 dir, where you can specify rotation or translation to obtain whatever initial condition you need. A rotational example:

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      pointVectorField;
    location    "0.01";
    object      pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 0 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    side1
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    side2
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    top
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    bottom
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    wall
    {
        type            angularOscillatingDisplacement;
        value          uniform (0 0 0);
        axis            (0 0 1);
        origin          (0 0 0);
        angle0          0;
        amplitude      0.262;
        omega          1.57;
    }

}

Based on the omega, you can figure out how long you need to run moveDynamicMesh for to reach the desired amplitude of motion.

I hope this helps.


Greg

samiam1000 May 17, 2012 04:12

Hi Greg and thanks a lot for answering.

I have one more (slightly different) question: if I would like to perform a simulation on a moving geometry (i.e. an opening door), is it possibile to create 10 meshes (each one created with a mesh generator) and study the solution on those meshes?

If so, the point is: how can I assign the solution at time step n to the initial guess of the step (n+1)?

Thanks a lot,
Samuele

gfilip May 17, 2012 08:34

I'm not sure if I am understanding your question. You would like to take the solution at some time n from one of your 10 meshes and make that an initial condition for the next mesh? If thats the case, then you can use mapFields to do this, which essentially takes the field data and interpolates it onto a different grid. The closer the two grids are to each other, the better of course.

samiam1000 June 14, 2012 05:25

Dear Greg,

thanks for answering.

One more question: could you explain the meanings of these entries

Code:


    wall
    {
        type            angularOscillatingDisplacement;
        value          uniform (0 0 0);
        axis            (0 0 1);
        origin          (0 0 0);
        angle0          0;
        amplitude      0.262;
        omega          1.57;
    }

,

please?

Thanks a lot, Samuele

samiam1000 June 27, 2012 04:32

Dear Philipp, Dear All,

something very strange happens. I am working on a dynamic mesh. All the dictionary I set, work very well for a certain geometry, but they don't for another one (of course I've edited the patch names).

I can share my case if someone is interested and would like to help me.

Thanks,

Samuele

luchen2408 March 19, 2014 06:35

how to define 6DOF motion in the motionProperties
 
hello,gfilip and samiam1000 , I am studying how to define the 6DOF mition in the motionProperties. I can use the interDyMFoam solver to solve two phase simulations. For more than three phase simluation, I have to take another solver multiphaseInterFoam. I want to input the 6DoF motion into the "motionProperties "file. Do you know how to do it? Thank you


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