CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Species transport equation source term udf

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

Like Tree1Likes
  • 1 Post By Anshs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2020, 10:59
Default Species transport equation source term udf
  #1
Member
 
Anshuman Sinha
Join Date: Oct 2018
Posts: 70
Rep Power: 4
Anshs is on a distinguished road
I am modeling a species mass transfer model, in which I want to transfer a species from one phase to another phase. I am trying to express this process with the last term of the equation given below. [ m_dot(p_j,q_i) = mass transfer of 'species j from p phase' to 'species i of q phase' ]

Screenshot 2020-05-23 at 10.31.53 AM.jpg

Can anyone please help me with a very basic example of which UDF macro to use and how may I assign the phases and the species?
vavnoon likes this.
Anshs is offline   Reply With Quote

Old   May 27, 2020, 14:48
Default
  #2
Member
 
Anshuman Sinha
Join Date: Oct 2018
Posts: 70
Rep Power: 4
Anshs is on a distinguished road
Any help on this post?

Thanks
Anshs is offline   Reply With Quote

Old   May 28, 2020, 11:30
Default
  #3
Member
 
Anshuman Sinha
Join Date: Oct 2018
Posts: 70
Rep Power: 4
Anshs is on a distinguished road
Quote:
Originally Posted by Anshs View Post
I am modeling a species mass transfer model, in which I want to transfer a species from one phase to another phase. I am trying to express this process with the last term of the equation given below. [ m_dot(p_j,q_i) = mass transfer of 'species j from p phase' to 'species i of q phase' ]

Attachment 77892

Can anyone please help me with a very basic example of which UDF macro to use and how may I assign the phases and the species?

I have tried to use the example given in the fluent tutorial.

Code:
#include "udf.h"

 

DEFINE_MASS_TRANSFER(liq_gas_source, cell, thread, from_index,

from_species_index, to_index, to_species_index)

{

   real m_lg;

   real T_SAT = 373.15;

   Thread *gas = THREAD_SUB_THREAD(thread, from_index);      // gas phase

   Thread *liq = THREAD_SUB_THREAD(thread, to_index);          // liquid phase

 

   m_lg = 0.;           // initialisation 


   if ((m_lg == 0. ) && (C_T(cell, gas) <= T_SAT))

     {

       m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,gas)*

         fabs(T_SAT-C_T(cell,gas))/T_SAT;

          from_species_index = 0. (let's say the first species)
          to_species_index = 2. (let's say the third species)

        m_lg = 0.1* C_VOF(cell,gas) * C_R(cell,gas) * C_YI(c , gas , 0)  ;

//here C_YI(c, gas, 0 ), denotes species mass fraction of 1st species in the mixture denoted by phase 'gas'.

      }

   return (m_lg);

Is the above UDF correct?

But how will the UDF know whether to transfer the species to 'to_species_index = 2'?
Anshs is offline   Reply With Quote

Reply

Tags
mass transfer, source term, species equations, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 61 November 9, 2020 10:52
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 10:57


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