CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

multiple patches in toposet and setfields overset problem for sixdofrigidbodymotion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2021, 05:02
Default multiple patches in toposet and setfields overset problem for sixdofrigidbodymotion
  #1
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
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.
Attached Files
File Type: zip all.zip (70.7 KB, 18 views)
File Type: zip cylinder.zip (5.1 KB, 6 views)
File Type: zip refinementZone.zip (6.8 KB, 6 views)
Redrakham is offline   Reply With Quote

Old   March 2, 2021, 04:50
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
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.
mAlletto is offline   Reply With Quote

Old   March 2, 2021, 05:15
Default
  #3
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
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;
}
}

}
************************************************** *********************** //
Redrakham is offline   Reply With Quote

Old   March 2, 2021, 06:14
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Can you sketch the case you are trying to solve
mAlletto is offline   Reply With Quote

Old   March 2, 2021, 06:20
Default
  #5
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Did you have a look at this tutorial. There are two zones specified
https://develop.openfoam.com/Develop...woSimpleRotors
mAlletto is offline   Reply With Quote

Old   March 2, 2021, 07:37
Default
  #6
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
Here is the geometry.
Attached Images
File Type: png Screenshot_79.png (86.9 KB, 58 views)
Redrakham is offline   Reply With Quote

Old   March 2, 2021, 07:38
Default
  #7
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
I tried all the things but no hope.
Redrakham is offline   Reply With Quote

Old   March 2, 2021, 07:49
Default
  #8
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Are the cylinders suposed to move independently from each other
mAlletto is offline   Reply With Quote

Old   March 2, 2021, 07:57
Default
  #9
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
No, they are rigidly connected.
Redrakham is offline   Reply With Quote

Old   March 3, 2021, 06:02
Default
  #10
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Can you provide a zipped file which contains your case together with an allrun script to reproduce the error
mAlletto is offline   Reply With Quote

Old   March 3, 2021, 07:19
Default
  #11
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
It is the same case. Only I made two cylinders separately with blockMesh.
Attached Files
File Type: zip moving_cylinder.zip (153.9 KB, 17 views)
Redrakham is offline   Reply With Quote

Old   March 3, 2021, 09:03
Default
  #12
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
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...
mAlletto is offline   Reply With Quote

Old   March 3, 2021, 11:15
Default
  #13
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
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.
Redrakham is offline   Reply With Quote

Old   March 3, 2021, 11:17
Default
  #14
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Which version do you have?
mAlletto is offline   Reply With Quote

Old   March 3, 2021, 11:26
Default
  #15
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
OpenFoam v2012.
Redrakham is offline   Reply With Quote

Old   March 3, 2021, 11:43
Default
  #16
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
My version is 2012. You can see it in the screenshot.
Attached Images
File Type: png Screenshot_80.png (71.5 KB, 27 views)
Redrakham is offline   Reply With Quote

Old   March 3, 2021, 12:12
Default
  #17
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
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.
mAlletto is offline   Reply With Quote

Old   March 3, 2021, 12:19
Default
  #18
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
Ooops!! My bad. I think some my files have gone missing while downloading. I will re-upload the case.
Redrakham is offline   Reply With Quote

Old   March 3, 2021, 12:31
Default
  #19
New Member
 
Abhijit
Join Date: Aug 2020
Location: India
Posts: 27
Rep Power: 5
Redrakham is on a distinguished road
Here is the case file. I hope this time there will be no problem.
Attached Files
File Type: zip moving_cylinder.zip (163.1 KB, 12 views)
Redrakham is offline   Reply With Quote

Old   March 3, 2021, 14:28
Default
  #20
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
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
mAlletto 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
fail to run series of runApplication topoSet -dict jiahui_93 OpenFOAM Programming & Development 1 May 25, 2022 12:56
Multiple setFields regions marcociccio OpenFOAM 2 November 13, 2016 05:53
toposet or setFields!! Salam-H OpenFOAM Pre-Processing 9 November 10, 2013 17:31


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