-
-
May 13, 2019 at 4:34 am
vidyadhar.kpm
SubscriberHello,
My domain consists of liquid and vapor separated by an interface.
If I use the macro DEFINE_MASS_TRANSFER to apply phase change from liquid to vapor, does the phase change apply to the entire region of domain?
(OR)
If I use an conditional statement to apply near the interface cells as shown below, does it work?
DEFINE_MASS_TRANSFER(liq_gas_source,c,t,from_index,from_species_index,to_index,to_species_index)
 {
   Thread *gas=THREAD_SUB_THREAD(t,to_index);
   Thread *liq=THREAD_SUB_THREAD(t,from_index);
   real source;
   if (0.1      {
         if (C_T(c,liq)>T_SAT)
         {
            source=3.2*(C_T(c,liq)-T_SAT)*(C_UDMI(c,t,0));
         }
      }
      return source;
 }
Â
Thanks & Regards,
vidyadhar
-
May 13, 2019 at 4:43 am
DrAmine
Ansys EmployeeIt just applies the mass transfer as described. Best to use gradient based interfacial area to apply only near the free surface for example -
May 13, 2019 at 4:56 am
vidyadhar.kpm
SubscriberHello Amine,
Just to add to the above question:
will the DEFINE_MASS_TRANSFER macro loops over all the cells in the free surface region?
In other words, how many times the macro would execute?
My intention is to apply the mass transfer on the entire interface area.
Â
Thanks & Regards,
Vidyadhar
-
May 14, 2019 at 9:53 am
vidyadhar.kpm
SubscriberHello Amine,
The line "return source;" in the following UDF returns the value present in "source" to the Fluent Solver. I want to store the mass transfer rates into "source" in the entire region where the gradients of volume fraction are non-zero. Could you please let me know whether the UDF returns "source" to Fluent on the entire region where the gradients are non-zero. If it does not, then should I use some kind of looping macro on the cells near the interface. I request your advise on this.
DEFINE_MASS_TRANSFER(liq_gas_source,c,t,from_index,from_species_index,to_index,to_species_index)
 {
   Thread *gas=THREAD_SUB_THREAD(t,to_index);
   Thread *liq=THREAD_SUB_THREAD(t,from_index);
   real source;
   if (C_UDMI(c,t,0)!=0.0)              // C_UDMI(c,t,0) was used to store VOF gradients
      {
         if (C_T(c,liq)>T_SAT)
         {
            source=3.2*(C_T(c,liq)-T_SAT)*(C_UDMI(c,t,0));           // to store mass transfer rates into 'source'
         }
      }
      return source;
 }
Â
Thanks & Regards,
vidyadhar
-
May 14, 2019 at 11:31 am
DrAmine
Ansys EmployeeIt just return the sources to all regions if you are not adding restriction a that in your UDF. Actually the gradient of the VOF is non zero only at interphase.
-
May 14, 2019 at 12:54 pm
vidyadhar.kpm
SubscriberHello Amine,
By using DEFINE_MASS_TRANSFER, I could see Mass Transfer Rate 1 under Phase Interaction dialogue box.
1) The units of Mass Transfer Rate 1 are displayed as kg/m3-s. It means the mass transfer rate(kg/s) from one phase to the other per unit volume (m3) of the 'Surfaces' that I select from the contours dialogue box. Am I correct?
2) Since, according to Customization manual: "The mass transfer rate specified using a DEFINE_MASS_TRANSFER UDF is used to compute mass, momentum, energy and species sources for the phases involved in mass transfer", could you please let me know how/where to find the magnitude of the corresponding source terms. My intention is to estimate quantities such as heat transfer caused by the mass transfer.
Thanks & Regards,
Vidyadhar
-
May 15, 2019 at 6:05 am
DrAmine
Ansys Employee1/Per unit spatial volume. Actually mass transfer is rather a surface phenomena that is it would be multiplied by interfacial area. You will then get the Mass Transfer Rate in Fluent which will be then multiplied with the local cell volume to obtain the mass flow rate from (left) phase to (right) phase in the panel.
Â
2/Secondary fluxes cannot be post-processed.
-
- The topic ‘zone of applicability — DEFINE_MASS_TRANSFER’ is closed to new replies.
-
6625
-
1906
-
1469
-
1311
-
1022
© 2026 Copyright ANSYS, Inc. All rights reserved.