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

trying out solidBodyMotionSolver with dynamicFvMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2014, 06:42
Default trying out solidBodyMotionSolver with dynamicFvMesh
  #1
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 12
fedvasu is on a distinguished road
Hi Foamers,

I have the case of rotating fan, which I simulated using cyclicAMI(cylinder) around the fan and motion of the cyclicAMI was moving with respect to the domain
like propeller tutorial I was not able to predict forces accurately (other parameters were match with experiments).


so I am trying another approach I am using dynamicMotionSolverFvMesh my pointDisplacement file. I am getting FPE, when I did unset FOAM_SIGFPE and started the solver after a while forces on my patch "Imperial.*" keep decreasing and /0 happens.
I presume the diffusivity solver should take care of the mesh motion but it isn't

I have kept Courant number 0.2 (for the AMI case Courant number 1-2 was used)

Any help would be appreciated

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
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
{
    "ImperialBlade.*"
    {
      type            solidBodyMotionDisplacement;
      solidBodyMotionFunction axisRotationMotion;
      axisRotationMotionCoeffs {
	origin   (0 0 0);
	radialVelocity (0 -37.7 0);
      }
    }

    front
    {
      type            fixedValue;
      value           uniform (0 0 0);
    }

    back
    {
      type            fixedValue;
      value           uniform (0 0 0);
    }

     outerCylinder
     {
         type            fixedValue;
         value           uniform (0 0 0);
     }
}


// ************************************************************************* //
My dynamicMeshDict

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

dynamicFvMesh   dynamicMotionSolverFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solver displacementSBRStress;

displacementSBRStressCoeffs
{
  //diffusivity  uniform;                                                                                                                             
  // diffusivity  directional (1 200 0);                                                                                                              
  // diffusivity  motionDirectional (1 1000 0);                                                                                                       
  // diffusivity  file motionDiffusivity;                                                                                                             
  diffusivity  quadratic inverseDistance 1("ImperialBlade.*");
}
my FPE error

Code:
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::solidBodyMotionFunctions::axisRotationMotion::transformation() const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#4  Foam::solidBodyMotionDisplacementPointPatchVectorField::solidBodyMotionDisplacementPointPatchVectorField(Foam::pointPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::pointMesh> const&, Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#5  Foam::pointPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::solidBodyMotionDisplacementPointPatchVectorField>::New(Foam::pointPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::pointMesh> const&, Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#6  Foam::pointPatchField<Foam::Vector<double> >::New(Foam::pointPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::pointMesh> const&, Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#7  Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>::GeometricBoundaryField::readField(Foam::DimensionedField<Foam::Vector<double>, Foam::pointMesh> const&, Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#8  Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>::readFields(Foam::dictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#9  Foam::GeometricField<Foam::Vector<double>, Foam::pointPatchField, Foam::pointMesh>::readFields() in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#10   at displacementMotionSolver.C:0
#11  Foam::displacementMotionSolver::displacementMotionSolver(Foam::polyMesh const&, Foam::IOdictionary const&, Foam::word const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#12  Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver(Foam::polyMesh const&, Foam::IOdictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfvMotionSolvers.so"
#13  Foam::motionSolver::adddictionaryConstructorToTable<Foam::displacementSBRStressFvMotionSolver>::New(Foam::polyMesh const&, Foam::IOdictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfvMotionSolvers.so"
#14  Foam::motionSolver::New(Foam::polyMesh const&, Foam::IOdictionary const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#15  Foam::motionSolver::New(Foam::polyMesh const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#16  Foam::dynamicMotionSolverFvMesh::dynamicMotionSolverFvMesh(Foam::IOobject const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#17  Foam::dynamicFvMesh::addIOobjectConstructorToTable<Foam::dynamicMotionSolverFvMesh>::New(Foam::IOobject const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#18  Foam::dynamicFvMesh::New(Foam::IOobject const&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libdynamicFvMesh.so"
#19  
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/pimpleDyMFoam"
#20  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#21  
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/pimpleDyMFoam"
Floating point exception (core dumped)
fedvasu is offline   Reply With Quote

Old   March 24, 2014, 02:51
Default getting nan at the first transformation step
  #2
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 12
fedvasu is on a distinguished road
when i unset FOAM_SIGFPE variable and run pimpleDyMFoam

I found this line
Code:
solidBodyMotionFunctions::axisRotationMotion::transformation(): Time = 0 transformation: ((nan nan -nan) (-nan (-nan -nan -nan)))
I am not sure why nan's are passed , do I have to make my blade an AMI?
fedvasu is offline   Reply With Quote

Old   April 8, 2014, 08:41
Default
  #3
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
Did you manage to solve your problem?
vasava is offline   Reply With Quote

Old   April 8, 2014, 10:19
Default
  #4
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 12
fedvasu is on a distinguished road
Quote:
Originally Posted by vasava View Post
Did you manage to solve your problem?
Hi Vasava,

yeah, If you unset FOAM_SIGFPE you'll notice that, omega*t is happening at 0 time as well.

Anyway I changed my dynamicMeshDict to use solidbody rotation and made my pointDisplacement as follows

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

dimensions      [0 1 0 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    "ImperialBlade.*"
    {
      type           calculated;
      uniform        (0 0 0);
    }

    front
    {
      type            fixedValue;
      value           uniform (0 0 0);
    }

    back
    {
      type            fixedValue;
      value           uniform (0 0 0);
    }

     outerCylinder
     {
         type            fixedValue;
         value           uniform (0 0 0);
     }
}
// ************************************************************************* //
dynamicMeshDict
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   solidBodyMotionFvMesh;

motionSolverLibs ( "libFvMotionSolvers.so" );


solidBodyMotionFvMeshCoeffs
{
  solidBodyMotionFunction axisRotationMotion;
  axisRotationMotionCoeffs {
    patches   ("ImperialBlade.*");
    origin (0 0 0);
    radialVelocity (0 -2160 0);
  }

}

// ************************************************************************* //
my patch("ImperialBlade.*") moves just fine, but the forces are still over-predicting (Same as cyclicAMI case) and mass flow was way-off, way worse than cyclicAMI case (mayn't be due to mesh)

I will update if manage to get reasonable mass-flow and forces.
fedvasu is offline   Reply With Quote

Old   April 9, 2014, 00:29
Default
  #5
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
Ok. I was just curious about your dynamicMeshDict file. I am simulating objects thrown in to the air (like football) and am looking for help about mesh modifying with each time.
vasava is offline   Reply With Quote

Old   April 9, 2014, 03:10
Default
  #6
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 12
fedvasu is on a distinguished road
Quote:
Originally Posted by vasava View Post
Ok. I was just curious about your dynamicMeshDict file. I am simulating objects thrown in to the air (like football) and am looking for help about mesh modifying with each time.
if you know mass of your body, there is a provision to do 6-DOF mesh motion. checkout the wingMotion2D tutorial, I haven't tried but I was getting many results about 6-DOF while I was searching for this problem.
fedvasu is offline   Reply With Quote

Old   April 9, 2014, 03:30
Default
  #7
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
I have tried some of the 6dof tutorial successfully and even modified some tutorial to my needs. But these tutorials are good for cases where the final position of the moving object is not far from the original position.

I am looking for rather adaptive mesh. Currently I am reading about dynamicTopoFvMesh which seems promising to me.

Do you have any idea about adaptive mesh with openfoam??
vasava is offline   Reply With Quote

Old   April 9, 2014, 12:48
Default
  #8
Member
 
Join Date: Oct 2013
Posts: 92
Rep Power: 12
fedvasu is on a distinguished road
Quote:
Originally Posted by vasava View Post
I have tried some of the 6dof tutorial successfully and even modified some tutorial to my needs. But these tutorials are good for cases where the final position of the moving object is not far from the original position.

I am looking for rather adaptive mesh. Currently I am reading about dynamicTopoFvMesh which seems promising to me.

Do you have any idea about adaptive mesh with openfoam??
Agreed 6DOF is great only if the motion is oscillatory or displacement isn't far from equilibrium point. I am not sure about the adaptive mesh techniques, I couldn't figure out how to use rawtopochangerfvMesh.

Anyway, if it is possible for you, please post the dynamicMeshDict and pointDisplacement (if applicable) or any other dict important for the set-up.
fedvasu is offline   Reply With Quote

Old   April 10, 2014, 01:28
Default
  #9
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
While looking for help I realized that the solver dynamicTopoFvMesh may do the trick. I have started a thread and Sandeep Menon who has developed this tool is guiding on how to make it work with openFoam 2.2.0.
Attached Files
File Type: txt dynamicMeshDict.txt (1.3 KB, 112 views)
vasava is offline   Reply With Quote

Old   April 10, 2014, 01:34
Default
  #10
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
Here is the pointDiplacement file. This is the file I modified from the floatingObject tutorial.
Attached Files
File Type: txt pointDisplacement.txt (1.8 KB, 133 views)
vasava is offline   Reply With Quote

Reply

Tags
floating point error, mesh motion, openfoam-2.3


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
[Other] An updated look of dynamicFvMesh motion types fedvasu OpenFOAM Meshing & Mesh Conversion 0 March 10, 2014 13:40
dynamicMesh, dynamicFvMesh and meshPhi mturcios777 OpenFOAM Programming & Development 0 May 28, 2012 20:01
dynamicFvMesh usage bongbongxanh OpenFOAM 0 March 31, 2011 06:06
Valid dynamicFvMesh types in OF-1.6 xfeng OpenFOAM Running, Solving & CFD 1 January 18, 2010 04:38
TurbDyMFoam Unknown dynamicFvMesh type mixerFvMesh david OpenFOAM Running, Solving & CFD 11 February 16, 2009 16:30


All times are GMT -4. The time now is 09:52.