CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   multiple patches in toposet and setfields overset problem for sixdofrigidbodymotion (https://www.cfd-online.com/Forums/main/234125-multiple-patches-toposet-setfields-overset-problem-sixdofrigidbodymotion.html)

Redrakham February 24, 2021 05:02

multiple patches in toposet and setfields overset problem for sixdofrigidbodymotion
 
3 Attachment(s)
Hi,
I am new in openFoam. I am solving sixdofrigidbodymotion for tandem arrangement of cylinder. I created the cylinders in gmsh and others in blockMessh. But when I try to setFields and setting topology only happens for one cylinder. I have tried everything but got nothing. Please help!!!
I am attaching my case here.

mAlletto March 2, 2021 04:50

Can you describe the Problem in order that one does not have to download the files, run and look at the results?

This is a bit of work and probably this is the reason you did not get any answer yet

If you can pose your Problem in a way that one understands quickly what is going wrong the probabilty to get an answer is much higher than in the way you did it.

Redrakham March 2, 2021 05:15

I am doing an OpenFoam case with two cylinders in tandem arrangement with overset mesh- a background mesh, one refinement zone and two cylinder mesh. I am using overPimpleDyMFoam but got this error: Attempt to cast type dynamicOversetFvMesh to type dynamicMotionSolverFvMesh.

This is my dynamicMeshDict:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

motionSolverLibs ("libsixDoFRigidBodyMotion.so");
dynamicFvMesh dynamicOversetFvMesh;
/*
dynamicOversetFvMeshCoeffs
{
// layerRelax 0.3;
}
*/

//motionSolverLibs ( "libfvMotionSolvers.so" );
//
//solver displacementLaplacian;
//
//displacementLaplacianCoeffs
//{
// diffusivity uniform 1;
//}


solver sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
patches (cyl);

innerDistance 100.0;
outerDistance 101.0;

mass 1.5707963;
centreOfMass (0 0 0);
momentOfInertia (1 1 1);
orientation
(
1 0 0
0 1 0
0 0 1
);
velocity (0 0 0);
acceleration (0 0 0);
angularMomentum (0 0 0);
torque (0 0 0);

g (0 0 0);
rho rhoInf;
rhoInf 1;
accelerationRelaxation 0.9;
accelerationDamping 0.95;
report on;
reportToFile on;
solver
{
type Newmark;
}

constraints
{
yLine_1
{
sixDoFRigidBodyMotionConstraint line;
direction (0 1 0);
}

noAxis_1
{
sixDoFRigidBodyMotionConstraint orientation;
}
}

restraints
{
verticalSpring_1
{
sixDoFRigidBodyMotionRestraint linearSpring;

anchor (0 2 0);
refAttachmentPt (0 0 0);
stiffness 1.72257;
damping 0;
restLength 2;
}
}

}
************************************************** *********************** //

mAlletto March 2, 2021 06:14

Can you sketch the case you are trying to solve

mAlletto March 2, 2021 06:20

Did you have a look at this tutorial. There are two zones specified
https://develop.openfoam.com/Develop...woSimpleRotors

Redrakham March 2, 2021 07:37

1 Attachment(s)
Here is the geometry.

Redrakham March 2, 2021 07:38

I tried all the things but no hope.

mAlletto March 2, 2021 07:49

Are the cylinders suposed to move independently from each other

Redrakham March 2, 2021 07:57

No, they are rigidly connected.

mAlletto March 3, 2021 06:02

Can you provide a zipped file which contains your case together with an allrun script to reproduce the error

Redrakham March 3, 2021 07:19

1 Attachment(s)
It is the same case. Only I made two cylinders separately with blockMesh.

mAlletto March 3, 2021 09:03

Hello what kind of OF version are you using?


I try to run the scripts with OF2012 and there are a lot of errors thrown. Like in all/ the system/blockMeshDict is missing ...
you run in the file run_mesh.sh the command blockMesh in the folder all and no blockMesh dict is present...




So I'm wondering if you have checked the script before you submitted it...

Redrakham March 3, 2021 11:15

I have the same version of OpenFoam. I have not encountered the blockMeshDict problem. I run the command: "sh run_all.sh" in the moving cylinder directory not inside the all directory.

mAlletto March 3, 2021 11:17

Which version do you have?

Redrakham March 3, 2021 11:26

OpenFoam v2012.

Redrakham March 3, 2021 11:43

1 Attachment(s)
My version is 2012. You can see it in the screenshot.

mAlletto March 3, 2021 12:12

my version is the same





I'm wounder in your shell script run_meh.sh you have:


Code:



foamCleanTutorials

cd cylinder1
blockMesh | tee log.blockMesh
cd ..

cd cylinder2
blockMesh | tee log.blockMesh
cd ..

cd refinementZone
blockMesh | tee log.blockMesh
cd ..

cd all
blockMesh | tee log.blockMesh

so you run blockMesh in the directory all. But if no blockMeshDict is in all/system how it is possible you do not get any error.

Redrakham March 3, 2021 12:19

Ooops!! My bad. I think some my files have gone missing while downloading. I will re-upload the case.

Redrakham March 3, 2021 12:31

1 Attachment(s)
Here is the case file. I hope this time there will be no problem.

mAlletto March 3, 2021 14:28

If you comment out the function object



Code:





sixDoFRigidBodyState
    {
        type          sixDoFRigidBodyState;
        libs          ("libsixDoFRigidBodyState.so");
        angleFormat    degrees;
    }


the simulation runs.


The problem is that the sixDoFRigidBodyState tries a dynamic cast in the write() function:


Code:



const dynamicMotionSolverFvMesh& mesh =
 
        refCast<const dynamicMotionSolverFvMesh>(obr_);


I.E. it tries to cast a dynamicOversetFvMesh to a dynamicMotionSolverFvMesh.



dynamicMotionSolverFvMesh is derived from dynamicFvMesh


dynamicOversetFvMesh is derived from dynamicMotionSolverListFvMesh


dynamicMotionSolverListFvMesh is derived from dynamicFvMesh


apparently this side cast does not work


All times are GMT -4. The time now is 01:10.