CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   cell mass flux (https://www.cfd-online.com/Forums/cfx/221317-cell-mass-flux.html)

Industrial_CFD October 12, 2019 07:49

cell mass flux
 
Hoping someone can shed light on something I have been trying to do with CEL.

I have a phase change simulation and I need to compute a term that is the ratio of the condensate leaving each CV to the condensation rate. This ratio is used to calculate a part of the total thermal resistance.

Any ideas? In FLUENT I could fairly easily sum the flux's on each cell face to compute the total condensate leaving the cell. In CFX I don't see a CEL function that is the equivalent.

Industrial_CFD October 13, 2019 10:24

I guess I am wondering if there is a clever way of doing this that doesn't rely on the cell mass flux, which doesn't seem accessible through CEL. If I have to use FORTRAN I may just write it all in FLUENT UDFs...

Any advice is very much appreciated!

ghorrocks October 13, 2019 18:11

You don't have access to those factors in CEL. You will need user fortran for that.

But in CEL often you don't need them as you would implement the function differently in CFX to take advantage of this. Can you explain the function you are trying to implement?

Industrial_CFD October 13, 2019 18:43

I am trying to include the effect of inundation on the resistance to condensation mass transfer. The method I would like to implement requires a ratio of (f/mdot) where f if the condensate leaving the CV and mdot is the CV condensation rate.

So I would ideally sum the mass flux's on the faces, but I am definitely hoping there could be a more clever way to do this

ghorrocks October 14, 2019 00:55

The real world does not have control volumes, control volumes are a numerical approximation of the analytical process. So what are the continuous analytical equations you are trying to implement?

Industrial_CFD October 14, 2019 06:49

In each cell I need the ratio of the condensate rate leaving the cell (kg/s) to the condensation rate in the cell (kg/s). It is a measure of accumulation that is used to correct the thermal resistance based on a Nu for filmwise condensation over a single tube, for tubes further down the bundle that are seeing condensate 'rain down' from the top of the condenser tube bundle

ghorrocks October 14, 2019 17:20

As I said in my first post, the only way of doing this as you intend is by user fortran.

But I don't think either the model you are trying to implement is physically invalid, or the way you are trying to implement it is not appropriate for CFX. Quantities like accumulation of condensate and transport of condensate down the tube bundle is normally handled by a multicomponent mixture model (or maybe multiphase model).

Industrial_CFD October 16, 2019 17:01

So I have installed fortran and run the simple HVAC tutorial. I am very inexperienced with user fortran. I see that cell mass flux is in the variables file but not available for CEL. Is it possible to use user fortran to create an additional variable for each cell mass flux (x,y,z) component and then use it in my CEL expressions?

ghorrocks October 16, 2019 17:33

I am not an expert on user fortran and so cannot help you. CFX user fortran is complex. There are several tutorials on it in the documentation and on the ANSYS customer webpage.

But, again, I say that you are probably not taking the right approach here and in CFX it would be implemented differently. I cannot say anything until you tell us the physical model you intend to implement.

Industrial_CFD October 16, 2019 17:54

Hi Glenn,

First - thanks for your time and interest.

The overall model is a two-phase Euler Euler (steam condensation). Condensate is dispersed (assume d = 1 mm). No interphase heat transfer (saturated conditions), with a user specified interphase mass transfer.

The simulation is modeling condensation over a tube bundle.

thermal resistances include the tube wall, cooling water, condensate inundation/vapor shear.

Rinundation = R*(a/mdot)^n where n varies with distance from the bottom to the top of the bundle.

a = total condensate leaving cell
mdot = condensation rate in the cell

I was planning on accessing the cell mass flux vector to compute the net mass flux leaving the cell to get "a". I have everything else I need with CEL.

For now I assume a uniform inindation thermal resistance just to get the model running

Industrial_CFD October 16, 2019 18:16

Forgot to add: tube bundle is modeled as a porous region with anisotropic losses. Not a tube level resolution. Only the effect of the tubes

ghorrocks October 16, 2019 22:29

I assume:
* It is calculation of the Rindundation factor which is the subject of this question.
* It gives a thermal resistance from a film of fluid on the wall for a wall heat transfer model
* It will be added to other thermal resistances to give a total thermal resistance for a wall heat transfer model.

If these assumptions are wrong please let me know.

My comments:
The function R*(a/mdot)^n looks strange as it has no accumulation term. Shouldn't it include an accumulation term?

Answering your question regardless:
The condensate rate term can come from your user defined mass transfer.

The "a" term (condensate leaving the cell) - I assume this is by advection only. Can this be taken as condensate volume fraction * Velocity Magnitude?

Industrial_CFD October 17, 2019 08:40

It is a mass flow leaving the cell, so unfortunately it has to be in kg/s. My understanding is that in order to know this I would need the net mass flow in/out of each face. In a way this is an accumulation term, because it is comparing how much is leaving the cell vs. how much condensate is being created in the cell.

ghorrocks October 17, 2019 17:51

For the "a" term try volume fraction * velocity * area. I am not sure the solver will be happy with area as a volumetric variable but worth a try. Then "a" will be in kg/s.

Your second sentence is not what I mean. Yes, the difference between the in flow and out flow then gives you the accumulation, but only the accumulation for that time step. It has information about how much was accumulated in previous time steps. This needs to be integrated over time so the material can accumulate over multiple time steps. This is what I mean by not having any accumulation terms.

Industrial_CFD October 18, 2019 12:05

area needs a locator, so I think I am stuck trying user fortran.
Thanks again for your help/advice.

ghorrocks October 18, 2019 19:30

Use the domain as the locator. Also, note I am not talking about the CEL expression area, I am talking about the variable area. It gives the area of the control volume, but I do not know exactly what area it returns when applied to a volume.


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