# cell mass flux

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 12, 2019, 08:49 cell mass flux #1 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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.

 October 13, 2019, 11:24 #2 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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!

 October 13, 2019, 19:11 #3 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,402 Rep Power: 127 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? __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 October 13, 2019, 19:43 #4 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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

 October 14, 2019, 01:55 #5 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,402 Rep Power: 127 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? __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 October 14, 2019, 07:49 #6 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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

 October 14, 2019, 18:20 #7 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,402 Rep Power: 127 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). __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 October 16, 2019, 18:01 #8 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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?

 October 16, 2019, 18:33 #9 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,402 Rep Power: 127 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. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 October 16, 2019, 18:54 #10 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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

 October 16, 2019, 19:16 #11 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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

 October 16, 2019, 23:29 #12 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,402 Rep Power: 127 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? __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 October 17, 2019, 09:40 #13 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 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.

 October 17, 2019, 18:51 #14 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,402 Rep Power: 127 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. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 October 18, 2019, 13:05 #15 Member   Anonymous Join Date: Jan 2012 Location: Canada Posts: 65 Rep Power: 10 area needs a locator, so I think I am stuck trying user fortran. Thanks again for your help/advice.

 October 18, 2019, 20:30 #16 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 16,402 Rep Power: 127 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. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.