|
[Sponsors] |
March 6, 2012, 03:55 |
Guide me
|
#1 |
New Member
Negar
Join Date: Dec 2011
Posts: 2
Rep Power: 0 |
Hello dear friends,I simulated a membrane process by FLUENT.I have a mixture consist of two species and process is gas separation.I wrote a UDF for source terms but I have a problem with line (Domain* domain; cell_t c; face_t f; Thread *t; Domain *d; int i).I send only species 1 transport UDF for two sides of membrane. Please guide me.Thanks a lot. #include "udf.h" Domain* domain; cell_t c; face_t f; Thread *t; Domain *d; int i;#include "mem.h" #define ro 0.13 #define M1 2 #define M2 44 #define epsilon1 0.9 #define epsilon2 1 #define k 1 #define sigma11 1 #define sigma12 0.9 #define sigma22 1.1 #define sigma21 0.95 #define Co1 2.72e-6 #define Co2 23.29e-8 #define Ea1 8.71 #define Ea2 -1.72 #define R 8.314 #define A 0.002512 #define deltaP 100000 DEFINE_SOURCE(species_source1,c,t,dS,eqn) { thread_loop_c (t,domain) { if (THREAD_ID(thread)==2) { begin_c_loop_all(c,t)real y1; real y2; real dy1; real x1; real x2; real p; real T; real D11; real D12; real j1; real permeance1; real per1; real source1; {y1=C_YI(c,t,0); DEFINE_SOURCE(species_source1Re,c,t,dS,eqn)y2=C_YI(c,t,1); dy1=C_YI_G(c,t,0)[1]; p=C_P(c,t); T=C_T(c,t); x1=(y1/M1)/(y1/M1+y2/M2); x2=1-x1; D11=0.018583*pow(T,1.5)*(pow(((1/M1)+(1/M1)),0.5))/(p*pow(sigma11,2)*k/(pow(epsilon1*epsilon1,0.5))); D12=0.018583*pow(T,1.5)*(pow(((1/M1)+(1/M2)),0.5))/(p*pow(sigma12,2)*k/(pow(epsilon1*epsilon2,0.5))); j1=-(ro*(1-x1)*dy1)/((x1/D11)+(x2/D12)); permeance1=Co1*exp(Ea1/(R*T)); per1=permeance1*A*deltaP/M1; source1=-(j1+per1); end_c_loop(c,t)}}}return source1;} { thread_loop_c (t,domain) { if (THREAD_ID(thread)==2) { begin_c_loop_all(c,t)real y1; real y2; real dy1; real x1; real x2; real p; real T; real D11; real D12; real j1; real permeance1; real per1; real source1; { y1=C_YI(c,t,0);
y2=C_YI(c,t,1); dy1=C_YI_G(c,t,0)[1]; p=C_P(c,t); T=C_T(c,t); x1=(y1/M1)/(y1/M1+y2/M2); x2=1-x1; D11=0.018583*pow(T,1.5)*(pow(((1/M1)+(1/M1)),0.5))/(p*pow(sigma11,2)*k/(pow(epsilon1*epsilon1,0.5))); D12=0.018583*pow(T,1.5)*(pow(((1/M1)+(1/M2)),0.5))/(p*pow(sigma12,2)*k/(pow(epsilon1*epsilon2,0.5))); j1=-(ro*(1-x1)*dy1)/((x1/D11)+(x2/D12)); permeance1=Co1*exp(Ea1/(R*T)); per1=permeance1*A*deltaP/M1; source1Re=j1+per1; end_c_loop(c,t)}}}return source1Re;} |
|
January 16, 2018, 06:16 |
|
#2 |
New Member
Sabrine BenSlama
Join Date: Jan 2018
Posts: 15
Rep Power: 8 |
Hey, I'm working on a membrane seperation process too and i have to simulate the coupled heat and mass transfer on ansys fluent .I'm new with fluent
I'm wondering if i should use multiphase model or write my own udf ! |
|
January 16, 2018, 08:09 |
|
#3 |
Member
annan
Join Date: Nov 2016
Posts: 72
Rep Power: 10 |
I think you will have to use both
|
|
Tags |
gas separation, membrane process, source terms |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFX-Mesh, guide vanes (baffles) and problems. | R. Janny | CFX | 2 | October 1, 2012 05:57 |
Spalart-Allmaras model in Ansys Fluent 12.0 theory guide | macfly | FLUENT | 0 | February 7, 2010 18:03 |
Fluent 5.5. What the differences with fluent 5.3?? | confused | FLUENT | 2 | July 29, 2001 22:58 |
CFD Books Guide Pre-Release, Help Needed | David & Jonas | Main CFD Forum | 1 | March 2, 2000 03:57 |