CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Setting up a porous medium (https://www.cfd-online.com/Forums/cfx/96398-setting-up-porous-medium.html)

Omerta January 21, 2012 15:38

Setting up a porous medium
 
2 Attachment(s)
I'm working on a design for one of my projects in university. Its a duct for a tidal turbine.

To simulate the turbines presence in the duct, I wanted to use a porous medium in the center to replicate the rotor. But I am having a hard time setting that center area as just the porous medium. I embedded a cylinder in my CAD drawing so now there are two bodies. But I do not know how to define the interaction between them in the simulation.

Could somebody send me in the right direction of where to start looking? Thanks

ghorrocks January 22, 2012 06:32

Use a momentum source term to do this. They are move general and you can apply a resistance to the flow in any form you like that way.

And the source term can be applied as either a volume or a surface the flow passes through (eg an interface).

Omerta January 22, 2012 12:35

ok, my prof recommended a porous medium over a momentum source... but you are right it should work fine.

Any suggestions on setting up the cylinder in the center? I cannot get them to interact well with eachother. It wants me to define the cylinder's surface as a wall or outlet etc. Should I stick with opening?

ghorrocks January 22, 2012 17:56

If you like you can use the porous flow equations in your region. But because your region is a turbine and not a porous region then I cannot imagine why you would want to. A general momentum source can be written which has the performance curve of the turbine you are using - you cannot do this with porous regions and it is far more accurate.

Assuming you are applying this as a 3D region, then select both the fluid volume and the turbine volume as the domain. Then you make the turbine region a sub-domain and apply the source term (or porous region if I am not convincing enough). No need for inlets or outlets. Also make sure the mesh is continguous between both regions.

Omerta January 23, 2012 01:21

Hmm, for some reason, it will not allow me to define the turbine region as a subdomain. Is that because it is a boundary region? Should I leave the CAD model as 2 bodies, with the second being the rotor and overlapping the fluid region around the shroud?

ghorrocks January 23, 2012 05:42

A subdomain is a 3D region. A boundary is a 2D surface on the outside of a 3D region.

Omerta January 23, 2012 09:48

Yes, but it will not allow me to select it as a subdomain because I subtracted the cylinder from the rest of the model.

When I didn't combine them it seemed to get confused on the interaction between the bodies

ghorrocks January 23, 2012 16:39

You need to decide what approach you are going to use. If you remove the region then you use a inlet/outlet pair to produce the flow. While this is simple it does make it hard to link to a fan characteristic curve. You can leave the region in and apply the fan as a momentum source. This is a little trickier as you have to do some extra meshing operations and define the momentum source term but is a better approach for most applications.

Omerta January 25, 2012 22:35

Hmm, I'm trying it with two bodies and using a momentum source. But, I've never sucessfully done a simulation with two bodies and am getting this error:

Quote:

+--------------------------------------------------------------------+
| Checking for Isolated Fluid Regions |
+--------------------------------------------------------------------+

2 isolated fluid regions were found in domain Default Domain


If the isolated regions do not have the pressure level set either
by the boundary conditions or using a reference pressure equation,
you may encounter severe robustness problems.

This situation may have arisen because a domain interface was not
properly defined during problem setup. Please carefully check
the setup.

The solver will stop now and write a results file. The isolated
regions can be visualised in CFX Post by making plots of the
variable "Isolated Volumes".

If you are sure that the pressure level is set in each isolated
fluid region then you can force the solver to turn off this check
by setting the expert parameter "check isolated regions = f".
Probably a basic mistake

Omerta January 25, 2012 23:56

Quote:

Originally Posted by Omerta (Post 341207)
Hmm, I'm trying it with two bodies and using a momentum source. But, I've never sucessfully done a simulation with two bodies and am getting this error:



Probably a basic mistake

I can't figure out how to tie the two regions together in CFX-Pre.

When I set a domain interface, it one let me select the end of the main body. Only the cylinder itself. Do I need to separate them and make a void in my CAD software? Because I think they are overlapping in the CAD software.

ghorrocks January 26, 2012 05:59

You need to define an interface to connect them with your current mesh. It can be a bit tricky selecting the correct surfaces but if you hide and unhide the bodies you can do it.

But a better approach is to remesh and make the common surface have a matching mesh. Then you will have no need for an interface.

Omerta January 26, 2012 19:01

1 Attachment(s)
Finally got that to work.

I had to separate my model again, making a void for the cylinder, then placing one as a second body inside of it.

Placed connections in CFX-Pre for their contact, and then the domain interfaces.

The subdomain is set as a -10 kg/m^2 in the Z component (against flow).

I'm having problems with divergence of the solution now, at about 25-40 iterations my KTurbKE starts to oscillate.

Any hints on how to keep that under control? What should I look into modifying?

ghorrocks January 26, 2012 19:09

Good progress.

You will probably need a source term linearisation coefficient. Read the documentation about source terms for this, but if you have defined a constant source then I think that goes to zero anyway so will not help.

Be careful with constant source terms - that means you are always adding momentum there, regardless of the flow conditions. It is better to define a fan curve.

It is also better to not require the domain interfaces. Try to mesh it with contiguous meshes so you do not need the interface. If you do not know how to do this then do some meshing tutorials.

But for your current convergence issues I would not worry about the turbulence equations too much yet. Get the pressure & momentum equations converging before you worry about the turbulence eqns.

Omerta January 26, 2012 19:20

I just used a constant because I wanted to get a solution to work, I will add a fan curve as I make more progress.

The turbulence equation stated oscillating and I was assuming that it threw off the rest of the solution as it had started then the pressure and momentum were soon to follow.

I'm using Ansys meshing and the tutorials suck for it. Its very difficult to have defined control over what is going on. But I'll see what I can dig up.

ghorrocks January 26, 2012 19:31

Let me give you a tip on the meshing - you need to define the two bodies as a single part and the interface surfaces will get a contiguous mesh. Look up multi-body parts in the tutorials or doco.

Your convergence problem probably just needs the normal approach - smaller timesteps, better initial conditions, better quality mesh.

Omerta January 27, 2012 10:04

Thanks, got it to converge now, with setting the timestep (forgot I reset all the data on Workbench) and high res turbulence.

Now to figure out that pump curve.

Omerta January 28, 2012 17:09

Quote:

Originally Posted by ghorrocks (Post 341406)
Let me give you a tip on the meshing - you need to define the two bodies as a single part and the interface surfaces will get a contiguous mesh. Look up multi-body parts in the tutorials or doco.

Your convergence problem probably just needs the normal approach - smaller timesteps, better initial conditions, better quality mesh.

I can't find any tutorials that use a momentum source. Any names of them come to the top of your head?


All times are GMT -4. The time now is 23:40.