CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Automatic recursive computation in CFX (https://www.cfd-online.com/Forums/cfx/196688-automatic-recursive-computation-cfx.html)

Torsten December 12, 2017 08:48

Automatic recursive computation in CFX
 
1 Attachment(s)
Hi,

I'm going to simulate a laminar flow through a filter with CFX 14.5. We consider only one single fiber within the filter in 2D (see the red square in the sketch). The upper and lower borders are considered as a free slip wall. At a first step, the inlet velocity u0 is constant, which is only true for the first column of fibers. Thus, for the inner fibers the inlet velocity profile is given by the outlet velocity profile from the previous domain. We assume that the velocity profile does not change anymore after a couple of fibers (within a tolerance).

Therefor I ran a simulation with constant inlet velocity and exported a .csv file with the boundary profile at the outlet. But I can not use this profile for a second run as new inlet via profile data initializion, because this boundary profile contains the coordinates of the outlet and not the inlet.

I could change the .csv file manually and adapt the coordinates (just setting a minus in front of the x-coordinate due to the coordinate origin in the middle of the fiber), but that is not desired!

Perhapse does somebody know a solution to achieve the velocity profile iteratively/recursively in CFX without changing it manually?


Thanks in advance for your help,
Torsten

ghorrocks December 12, 2017 21:06

Use translational periodic boundaries with a prescribed flow rate (or pressure drop).

Also, your top and bottom boundaries should be translational periodic boundaries as well, not free slip walls.

Torsten December 13, 2017 09:38

2 Attachment(s)
Dear Mr. Horrocks,

thank you for your advise. I tried out the translational periodic boundaries, but now my simulation is oscillating and thus it isn't converging.

I attach the original and modified CCL. Maybe you can see a a mistake in the model.
And thanks again for your help and advise!

ghorrocks December 13, 2017 16:43

Will the flow around the fibre shed vorticies, that is a Von Karman vortex street? I suspect your initial simulation using the slip wall boundaries was incorrectly suppressing the vorticies and the periodic boundaries are allowing it - and then they mean your steady state simulation will not converge.

Torsten December 14, 2017 08:18

We don't expect the Karman vortex street, because we consider laminar conditions with low reynolds numbers. In my test case it is Re=1 and the corresponding velocity u0. If the model is working appropriately, further investigations will have even smaller reynolds numbers. Therefore the flow should't develop a Karman vortex street.

ghorrocks December 14, 2017 18:52

OK, then I cannot see any reason why the translational periodic boundaries should not converge. Can you post an image of your mesh?

Torsten December 15, 2017 08:43

3 Attachment(s)
Sure, here are the images.

My mesh is pretty simple, just a square divided into several squares, 100 divisions per edge.
The fiber itself is implementet in CFX-pre. I created a subdomain with an extreme small permeability (1e-30 mē) for \sqrt{x^{2}+z^{2}} \leq r_{fiber} and for the remaining region an extreme high permeability (1e+30 mē).

If I consider the fiber within my geometry the meshing becomes more difficult for lower porosities. See the attached image of a porosity of 70%, my test case has a porosity of 99%. Just like in my thread "Boundary conditions for a rotational flow in a cubic mesh" the mesh has to be nicely structured, because we want to couple the CFX results with matlab.

Could it be, that the permeability version is causing the problems for the periodic boundaries?

I will try a new simulation with a smoother mesh, maybe that could be a problem too. I haven't done a mesh independence study yet, because first of all my model should work ;)

ghorrocks December 15, 2017 17:59

Why are you modelling the fibre with permeability? You are essentially a free flow outside the fibre and essentially no flow inside the fibre - so why not just use a normal flow domain and walls to model this?

Torsten January 10, 2018 11:19

2 Attachment(s)
Sorry for my late response!

The reason why I'm simulating the fibre via a subdomain (and permeability) is the required mesh structure for my matlab routine.
Addionally, for a lower porosity it is much harder to create a adequate mesh, see pictures. That is why I'm using cartesian coordinates (+subdomain) instead of cylindrical coordinates. The ring around the fiber is the diameter (dFiber + dParticle) at which the particles are going to be segregated from the fluid.

This remindes my, I should mention that we are investigating both, euler-euler and euler-lagrange.

ghorrocks January 10, 2018 16:02

Why is the matlab mesh different to the fluid domain mesh? Why is the mesh a function of porosity?

Torsten January 11, 2018 05:31

Sorry, I mixed it up with a second post where I explained the issue with matlab.

What I am going to do is to simulate of the particle trajectories in the filter and (the second post) a rotary sprayer. I gain this trajectories on three different way:
1st: CFX Euler-Euler simulation.
2nd: CFX Euler-Lagrange simulation (at first only one way coupling).
3rd: CFX Euler simulation of the fluid and trajectory computation in matlab.
In the end I'm going to compare these results withe each other and with the theoretical results out of the literature. To be precise, the first case does not gain any trajectories, but we compare the effectiveness of the filter with the theory.

My matlab routine requires only the flow field of the fluid, thus I have to extract the necessary data from CFX. Yet, I couldn't figure out a way to extract the connectivity table of the cells/nodes. Thus I have to use a strucured mesh instead of an unstructured!

Even if I could extract the connectivity table, an unstructured mesh would lead to extremly increased computational costs in my matlab routine. Therefore I'm using a structured mesh where I'm able to simply sort my data regarding to the node coordinates and have automatically the knowledge of the neighboring nodes.

To your second question:
The distance between the fibers is determined by the porosity and the fiber diameter.

A_{total} = h^{2} ;           A_{fiber} = \frac{\pi * d^{2}_{fiber}}{4}
\epsilon = 1 - \frac{A_{fiber}}{A_{total}}
\Rightarrow \frac{h}{d_{fiber}} = \sqrt{\frac{\pi }{4 * (1- \epsilon)}}
where h is the length of the square and \epsilon the porosity

For lower porosities and a fixed diameter the ratio between h and d becomes smaller and therefore more challenging to create a adequate mesh (see my previous images).

ghorrocks January 12, 2018 03:04

Thanks for the background, it helps to understand what you are doing.

But I am now even more confused about why you are talking about simulating the fibre as a porous region. Why can't you model the fibre as a solid (that is, a section removed from the mesh with wall boundaries) and the fluid surrounding the fibres as a normal fluid domain?

I realise that on a macro scale the mesh has a porosity, but you are talking about a micro scale model here - that is you are modelling each individual fibre and space between the fibres. Porosity does not apply on this scale as you are resolving everything.


All times are GMT -4. The time now is 17:39.