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/)
-   -   Problem with icoDyMFoam (https://www.cfd-online.com/Forums/openfoam-solving/58184-problem-icodymfoam.html)

olivier March 17, 2008 02:58

Hello everybody I have been
 
Hello everybody

I have been starting to use OpenFoam not so long ago, and right now I am focusing on understanding the sliding interface code. In order to do that, I have been studying the code and the different tutorials one can find on svn and on the forum. To see if I had understood it correctly, I have done my own case, which is quite simple: my case conists in a conical diffuser, you can find the set up on the following link;
http://openfoamwiki.net/index.php/Si...e_next_meeting
I used the working case mixer2D to set up my case but unfortunately, something does not make sense:
in the dynamicMeshDict, you have to specify which part of your sliding interfice is rotating and which is not:
dynamicFvMeshLibs 1("libtopoChangerFvMesh.so");

dynamicFvMesh mixerFvMesh;

mixerFvMeshCoeffs
{
coordinateSystem
{
type cylindrical;
origin (0 0 0);
axis (0 0 1);
direction (1 0 0);
}

rpm 10;

slider
{
inside insideSlider;
outside outsideSlider;
}
}
In my case, only the wrong part of the geometry is rotating, no matter which part of the slider i put as inside or outside.
Does anyone has some clues on what is happening?
Thank you very much

hjasak March 17, 2008 03:17

The rotating part is chosen to
 
The rotating part is chosen to be closest contiguous domain to the origin of the coordinate system. I know this is not absolutely general but it seemed like a good idea at the time.

Do you need this changed/how would you like to define the rotating part?

Hrv

olivier March 17, 2008 03:29

I thought that the rotating pa
 
I thought that the rotating part was defined in the dynamicMeshDict, with the definition of inside and outside. The origin of my coordinate system is at the entrance of the diffusor, so that makes sense and I do understand now my mistake. Is there some way to define the rotating part in an other way, let's say by using dynamicMeshDict? In the DynamicMeshDict, we can define an origin :
type cylindrical;
origin (0 0 0);
axis (0 0 1);
direction (1 0 0);
Is it possible to use this part to define the rotating part?
olivier

hjasak March 17, 2008 03:54

Well, look at what the code is
 
Well, look at what the code is doing:

// Mark every cell with its topological region
regionSplit rs(*this);

// Get the region of the cell containing the origin.
label originRegion = rs[findNearestCell(cs().origin())];

labelList movingCells(nCells());
label nMovingCells = 0;

forAll(rs, cellI)
{
if (rs[cellI] == originRegion)
{
movingCells[nMovingCells] = cellI;
nMovingCells++;

}

movingCells.setSize(nMovingCells);
Info << "Number of cells in the moving region: " << nMovingCells << endl;
}

Read:
- find nearest cell to the origin
- grab all cells in a detached zone around the origin

I am quite happy to add all other ways to do this, but some input is required: How would you like to collect the moving cells?

Hrv

olivier March 17, 2008 04:39

Hi Hrvoje thank you for you
 
Hi Hrvoje

thank you for your quick answers. Now that I know where the problem lies, I have just translated my geometry so that the origin lies is located in the desire part.
But I was thinking of an other way to get the region of the cells that are supposed to move: do you think it is doable to get the moving cells by specifying some kind of boundary region? I mean like specifying that the movingCells are to be find between inlet, movingWall and insideSlider. Do you think it would be doable?
olivier

hjasak March 17, 2008 05:08

Well, all I need is a cell zon
 
Well, all I need is a cell zone containing moving cells. The problem is that the cell zone has to be detached from the rest of the mesh by boundaries and detached from the rest of the mesh - this is why I prefer to have it calculated automatically.

The question boils down to: are the users sophisticated enough to grasp this? If you think so, we can easily add an optional argument of moving cell zone name.

Hrv

olivier March 17, 2008 05:25

I am thinking of finding the b
 
I am thinking of finding the best way to specify the rotating region, but first I need to understand all entries in the dynamicMeshDict. It seems like origin and axis define the rotational axis. This origin has nothing to do with the one used in the code to define the moving cells. Is this correct?
There is also the direction which i do not understand the purpose of. Can you explain it to me please?
I would propose to specify in this dynamicMeshDict an other point that would be used in the definition of the moving cells, instead of the origin. That would be very easy to implement. The default value could still be the origin.
Thank you
olivier

hani March 17, 2008 11:14

Hi Hrv, From the piece of c
 
Hi Hrv,

From the piece of code you presented I guess that it would be sufficient to modify the following line so that the user can specify the point instead of using the origin:

// Get the region of the cell containing the origin.
label originRegion = rs[findNearestCell(cs().origin())];

That would be general enough, and it wouldn't require too much from the user. The point could be specified in the dynamicMeshDict, and it may be called something like rotatingRegionMarkerPoint

Håkan.

hjasak March 17, 2008 18:12

Agreed - do you fancy doing it
 
Agreed - do you fancy doing it?

Hrv

waterboy October 29, 2008 04:52

Hi, I have been trying to set
 
Hi,
I have been trying to set up a mixer-like case with 1.4.1-dev. Hroves 3D mixer case is running fine but mine quits with a segmentation fault.

Exec : icoDyMFoam . mixer3DPal
Date : Oct 29 2008
Time : 10:13:54
Host : pc080442
PID : 4591
Root : /home/negast1/OpenFOAM/negast1-1.4.1-dev
Case : mixer3DPal
Nprocs : 1
Create time

Create dynamic mesh for time = 0

Selecting dynamicFvMesh mixerFvMesh
void mixerFvMesh::addZonesAndModifiers() : Zones and modifiers already present. Skipping.
Mixer mesh
origin: (0 0 150)
axis : (0 0 1)
rpm : 10
Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Volume: new = 3.91431e+08 old = 3.91431e+08 change = 0
Courant Number mean: 0 max: 0
deltaT = 1.1999e-05
Time = 1.1999e-05

Segmentation fault


I tried to understand the code but still have doubts. Is it OK that it says

void mixerFvMesh::addZonesAndModifiers() : Zones and modifiers already present. Skipping.


I understand I need to define zones. But The zone movingcells is created by foam, according to the above, right? By the way, is it smart to create zones from Sets with setsToZones if importing a *.unv mesh or are there better ways?
Thanks a lot for any help, I can share my case, if anyone bothers to see it. The origin defined in dynamicMeshDict is inside the moving part region...
Cheers,
Pal

waterboy October 29, 2008 08:57

Ok, stupid question:-) You rea
 
Ok, stupid question:-) You really only need the two patches and origin. As easy as that...

naoko_oyama November 11, 2008 11:35

Hello everyone, it was quit
 
Hello everyone,

it was quite clear for me how the code defines the rotating part by Prof. Jasak's explanation.
I'm working with 1.4.1-dev with GGI between the rotating part and the static part. It works pretty fine when I want to rotate a single region.


My question is; Has anyone worked with multiple rotating regions?


I had a look in the code of mixerGgiFvMesh.C and it seems that I need to make a change there to do so, however I am still struggling with the code.. If anyone had experienced this or has any idea how to do this, I would love to know...
Thank you
Naoko

mahendra November 17, 2008 05:22

Hello Foamers, I am trying
 
Hello Foamers,

I am trying to run the mixerVessel2D case using icoDyMFoam, but I am getting the following error.

Please help me in resolving the error.

ms.wankhede@linux:~/OpenFOAM/ms.wankhede-1.5/tut/icoDyMFoam/mixerVessel2D> icoDyMFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.5 |
| \ / A nd | Web: http://www.OpenFOAM.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : icoDyMFoam
Date : Nov 17 2008
Time : 15:55:44
Host : linux
PID : 24762
Case : /home/ms.wankhede/OpenFOAM/ms.wankhede-1.5/tut/icoDyMFoam/mixerVessel2D
nProcs : 1

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

Create mesh for time = 0

Selecting dynamicFvMesh mixerFvMesh


Unknown dynamicFvMesh type mixerFvMesh

Valid dynamicFvMesh types are :

5
(
dynamicRefineFvMesh
staticFvMesh
dynamicMotionSolverFvMesh
dynamicInkJetFvMesh
solidBodyMotionFvMesh
)


From function dynamicFvMesh::New(const IOobject&)
in file dynamicFvMesh/newDynamicFvMesh.C at line 79.

FOAM exiting

ms.wankhede@linux:~/OpenFOAM/ms.wankhede-1.5/tut/icoDyMFoam/mixerVessel2D>

Where can i find mixerFvMesh, or do i need to make it?

Regards,
Mahendra.

tino_boelke December 19, 2008 09:03

Hello Mahendra, actually i
 
Hello Mahendra,

actually i have the same problem, look at this

http://www.cfd-online.com/OpenFOAM_D...tml?1229605359

did you find a solution? Im sure well solve this problem with help of this Forum.

Regards, Tino.


All times are GMT -4. The time now is 18:20.