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/)
-   -   GGI validation with a cylinder (https://www.cfd-online.com/Forums/openfoam-solving/77044-ggi-validation-cylinder.html)

rieuk June 11, 2010 02:56

GGI validation with a cylinder
 
Hi guys,

I'm trying to confirm whether GGI is doing what I want it to - I've setup a case with a 2D rotating cylinder with uniform inflow. The boundary condition on the cylinder is fixedValue with uniform (0 0 0) while using GGI to rotate the mesh. Now I'm comparing this to a simulation of a static cylinder (with no moving mesh). The solutions should be the same, right? But they're quite different from what I am seeing...

I use icoFoam in the static case and icoDyMFoam in the dynamic mesh case. The cylinder wake region is much smaller in the moving mesh case. Any thoughts?

rieuk June 13, 2010 08:27

Are the differences between the icoDyMFoam and icoFoam solvers that great? I can't think of why the results are so different...

hjasak June 13, 2010 08:38

A case like this with a cylinder in rotation AND with a static cylinder are a part of the test loop. I am sure this works - please review your setup in case it's am "obvious error" as I am certain the code is correct.

Hrv

rieuk June 14, 2010 05:36

Thanks for the reply. Well I'm not saying the code is wrong, just different. But I may be wrong...

I've checked the setup, initialisation and all schemes used are exactly the same - maybe you could take a peek and pick out the obvious mistake (pls :)?

I am using a sinusoidal rotation though so the modified mixerGgiFvMesh.C and header file are included.

File is found here: http://www.megaupload.com/?d=YIG6YWOZ

rieuk June 16, 2010 09:54

Can anyone spot glaring differences between the two setups? I'm at a loss here and I can't proceed with the rest of my results unless this discrepancy is resolved :(

hjasak June 17, 2010 04:08

Sorry, I'm on the ECCOMAS Conference and next week there is the OpenFOAM Workshop, so there isn't much time. Maybe somebody else can help you now; otherwise this will need to wait for a bit.

Hrv

hansel June 27, 2010 08:29

Quote:

Originally Posted by rieuk (Post 262563)
Hi guys,

I'm trying to confirm whether GGI is doing what I want it to - I've setup a case with a 2D rotating cylinder with uniform inflow. The boundary condition on the cylinder is fixedValue with uniform (0 0 0) while using GGI to rotate the mesh. Now I'm comparing this to a simulation of a static cylinder (with no moving mesh). The solutions should be the same, right? But they're quite different from what I am seeing...

I use icoFoam in the static case and icoDyMFoam in the dynamic mesh case. The cylinder wake region is much smaller in the moving mesh case. Any thoughts?

Is it legal to have a fixedValue velocity inside a rotating mesh? I could see it possibly working for the cylinder, but if your shape was not symmetrical or not centered on the rotation, it would make no sense since the object would be moving but you'd be saying that the air next to it isn't moving with it.

I wonder if the software is even set up to handle this type of case.

hansel June 27, 2010 08:32

Quote:

Originally Posted by rieuk (Post 262563)
Hi guys,

I'm trying to confirm whether GGI is doing what I want it to - I've setup a case with a 2D rotating cylinder with uniform inflow. The boundary condition on the cylinder is fixedValue with uniform (0 0 0) while using GGI to rotate the mesh. Now I'm comparing this to a simulation of a static cylinder (with no moving mesh). The solutions should be the same, right? But they're quite different from what I am seeing...

I use icoFoam in the static case and icoDyMFoam in the dynamic mesh case. The cylinder wake region is much smaller in the moving mesh case. Any thoughts?

A more basic experiment might be to pass the air through a rotating mesh, but have your cylinder in the static part of the mesh behind the rotating mesh. This would still let you see if the flow passed through the rotating mesh properly and if it works on the cylinder the same way.

hjasak June 27, 2010 08:32

I would say you need a movingWallVelocity boundary condition. This will allow you to specify the b.c. in the moving coordinate system (well, on a moving boundary). For a wall this would be (0 0 0) and the code does the rest.

Is this what you are after?

Hrv

rieuk June 27, 2010 08:35

Hi Steve, Hrv,

Well the cylinder is centered at the origin and of course it is symmetric. I know rotating it with an absolute no slip condition is nonsensical but for the purposes of testing the solver with GGI, I'm saying it should produce the same solution as for flow over a cylinder that is not moving.

The alternative test you mentioned is also good but I'm more interested in the effect of the rotation on the convection of vortices created in the rotating region (since I'm looking at a pitching wing). The test that I'm doing should show me that and from what I'm seeing the effect is quite large unless something is amiss

hansel June 27, 2010 11:39

Quote:

Originally Posted by rieuk (Post 264705)
Hi Steve, Hrv,

Well the cylinder is centered at the origin and of course it is symmetric. I know rotating it with an absolute no slip condition is nonsensical but for the purposes of testing the solver with GGI, I'm saying it should produce the same solution as for flow over a cylinder that is not moving.

The alternative test you mentioned is also good but I'm more interested in the effect of the rotation on the convection of vortices created in the rotating region (since I'm looking at a pitching wing). The test that I'm doing should show me that and from what I'm seeing the effect is quite large unless something is amiss

Okay I'm confused. If this thing were in real life, what would it be???? Would it be a stationary cylinder or would be be a rotating cylinder? If rotating then you need the movingWallVelocity like Hrv says.

If you are trying to do a stationary cylinder in a rotation mesh, I think that's just going to cause all kinds of problems in the software because I can't see it being set up to handle that.

You should also note that while the mesh rotates, the 'air' in the mesh doesn't. I believe the mesh is rotated and then all the data in the mesh is counter rotated to keep it in the same place. (It's that counter rotating step that I think will get confused by your stationary boundary condition) Hrv would know better. But I have never seen the air move just because the mesh does.

rieuk June 27, 2010 12:37

Okay suppose I have a simulation of flow over a stationary cylinder on a fixed grid with no slip condition (zero wall velocity).

Now suppose I start rotating part of the mesh around the cylinder with GGI. At every time-step, the field variables need to be interpolated to new (shifted) cell centers, along with the face-cutting and interpolation jazz that needs to happen at the rotating-static mesh interface. All of this shouldn't affect the flow.

If also at each time-step I enforce zero velocity on all points at the cylinder surface, then this shouldn't affect the flow either - since it's the same boundary condition.

Therefore we should get the same solution, right? Of course in my pitching wing simulations I will use a movingWallVelocity BC....

rieuk June 29, 2010 05:33

Quote:

A more basic experiment might be to pass the air through a rotating mesh, but have your cylinder in the static part of the mesh behind the rotating mesh. This would still let you see if the flow passed through the rotating mesh properly and if it works on the cylinder the same way.
Well I ended up doing this test albeit with the rotating part behind the cylinder so I could see the vortices going through the rotating region. The differences between the solvers are still pretty stark. Are there particular interpolation schemes that work better with GGI? I'm using second order linear for everything except for convection for which I'm using vanLeerV.


All times are GMT -4. The time now is 13:45.