CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   openFoam_solver issue for different version (https://www.cfd-online.com/Forums/openfoam-solving/185926-openfoam_solver-issue-different-version.html)

maasyraf3 April 5, 2017 19:37

openFoam_solver issue for different version
 
Hi guys,

Really need your assistance on openFoam issue.

I am working on vortex mechanism on fluid passing through a cylinder.

Currently I am stuck with solver that not matching to be used in my OF version (3.0.x)
I have existing case files that work in version OF 2.2.2

The issue :
is on keyword solver. It is undefined when using 3.0.x.

What the replacement of "motion solver: sixDoFRigidBodyMotion" from 2.2.2 version to 3.0.x
Thank you very much..

Below is the dynamicMesh file that OF 3.0 cannot define the sixDoFRigidBodyMotion solver that used to be running in 2.2.2 OF

The solver is in dynamicMesh

Quote:


dynamicMeshDict - the original 2.2.2 controlDict version:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
solver sixDoFRigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
{
// D = 1m (r=0.5); L=1m
// Volume of cylinder V = D^2*pi/4 * L = 1^2*pi/4 * 1 = 0.25*pi
patches (cylinder);
innerDistance 0.35; //??
outerDistance 2.5; //??
mass 9.97; // m = 9.97 => rho_cylinder = m/V = 12.6946 [kg/m^3] ??only??
centreOfMass (4 0 0.5); //was (0 0 0.29); (Overall domain bounding box (0 -4 0) (16 4 1))
momentOfInertia (1.4539 1.4539 1.24625);//J = m*(1/12*(3*r^2 + L^2) 1/12*(3*r^2 + L^2) r^2/2)
//J = m*(0.14583 0.14583 0.125)
g (0 -9.81 0); //was (0 0 -9.81);
orientation
(
1 0 0
0 1 0
0 0 1
);
angularMomentum (0 0 0);
rhoName rhoInf;
rhoInf 1; // rho_cylinder is very small for this
report on;
constraints
{
maxIteration 500;
noRotate1
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 0 1);
}
noRotate2
{
sixDoFRigidBodyMotionConstraint axis;
axis (1 0 0);
}
noRotate3
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
// xLine
// {
// sixDoFRigidBodyMotionConstraint line;
// direction (1 0 0);
// }
yLine
{
sixDoFRigidBodyMotionConstraint line;
direction (0 1 0);
}
zAxis
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 0 1);
}
// zPlane
// {
// sixDoFRigidBodyMotionConstraint plane;
// normal (0 0 1);
// }
}
restraints //motion is constrained to z=const plane, so linear springs are neaded only for x and y direction.
{
// horisontalSpring
// {
// sixDoFRigidBodyMotionRestraint linearSpring;
// anchor (4 0 0.5); // was (0.2 0 0);//?
// refAttachmentPt (4 0 0.5); // was (0.092 0 0.384);//spring attached point on cylinder
// stiffness 4000;//?
// damping 0.5;//?
// restLength 0;//??
// }
verticalSpring
{
sixDoFRigidBodyMotionRestraint linearSpring;
anchor (4 0 0.5);
refAttachmentPt (4 0 0.5);
stiffness 700;//?
damping 0.5;//?
restLength 0;//??
}
// axialSpring
//{
// sixDoFRigidBodyMotionRestraint linearAxialAngularSpring;
// axis (0 0 1);
// stiffness 700;
// damping 0.5;
// referenceOrientation $orientation;
// }
// spring
// {
// sixDoFRigidBodyMotionRestraint linearSpring;
// anchor (4 0 0.5); // was (0.2 0 0);//?
// refAttachmentPt (4 0 0.5); // was (0.092 0 0.384);//spring attached point on cylinder
// stiffness 4000; //2.3225;// you should calculate it for your problem
// damping 2; //0.001;// this may be 0 or calculated for your problem
// restLength 0;
// }
}
}
// ************************************************** *********************** //





This is comment from openFoam when I try to run using pimpleDyMFoam

Quote:


$ pimpleDyMFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
|*---------------------------------------------------------------------------*|
|* OpenFOAM for Windows 16.10 (v1) *|
|* Built by CFD Support, www.cfdsupport.com (based on Symscape). *|
\*---------------------------------------------------------------------------*/
Build : 3.0.x-6431b10e9ee7
Exec : C:\OpenFOAM\16.10\cygwin64\opt\OpenFOAM\OpenFOAM-3.0.x\platforms\cygwin 64mingw-w64DPInt32Opt\bin\pimpleDyMFoam.exe
Date : Apr 05 2017
Time : 23:03:54
Host : "DESKTOP-VET2F2L"
PID : 7116
Case : C:/OpenFOAM/16.10/AMIRUL-3.0.x/run/tutorials/incompressible/pimpleDyMFo am/freeOscillationCylinder1
nProcs : 1
fileModificationChecking : Monitoring run-time modified files using timeStampMas ter
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: sixDoFRigidBodyMotion


--> FOAM FATAL IO ERROR:
keyword solver is undefined in dictionary "C:/OpenFOAM/16.10/AMIRUL-3.0.x/run/tu torials/incompressible/pimpleDyMFoam/freeOscillationCylinder1/constant/dynamicMe shDict.sixDoFRigidBodyMotionCoeffs"

file: C:/OpenFOAM/16.10/AMIRUL-3.0.x/run/tutorials/incompressible/pimpleDyMFoam/ freeOscillationCylinder1/constant/dynamicMeshDict.sixDoFRigidBodyMotionCoeffs fr om line 27 to line 115.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 648.

FOAM exiting

__________________


Tobi April 6, 2017 08:34

Hi,

as you get the information of the solver
Code:

eyword solver is undefined in dictionary  "C:/OpenFOAM/16.10/AMIRUL-3.0.x/run/tu                                                                                                                  torials/incompressible/pimpleDyMFoam/freeOscillationCylinder1/constant/dynamicMe                                                                                                                  shDict.sixDoFRigidBodyMotionCoeffs"
You should add the corresponding keyword into the sixDoFRigidBodyMotionCoeffs subdict in the dynamicMeshDict file. To make your life easier, you should go into a pimpleDyMFoam tutorial and check out how they set up the dictionary correctly.

maasyraf3 April 6, 2017 10:38

Quote:

Originally Posted by Tobi (Post 643905)
Hi,

as you get the information of the solver
Code:

eyword solver is undefined in dictionary  "C:/OpenFOAM/16.10/AMIRUL-3.0.x/run/tu                                                                                                                  torials/incompressible/pimpleDyMFoam/freeOscillationCylinder1/constant/dynamicMe                                                                                                                  shDict.sixDoFRigidBodyMotionCoeffs"
You should add the corresponding keyword into the sixDoFRigidBodyMotionCoeffs subdict in the dynamicMeshDict file. To make your life easier, you should check out get into a pimpleDyMFoam tutorial and check out how they set up the dictionary correctly.

Hi Tobi - thanks for the advices, currently I am going through the tutorial...
Hopefully will be more clearer.


All times are GMT -4. The time now is 16:43.