|
[Sponsors] |
November 16, 2017, 08:14 |
How to call volume fraction in UDF
|
#1 |
New Member
anubhav
Join Date: Sep 2014
Posts: 8
Rep Power: 12 |
Dear All
I am writing a udf in which I need to call the volume fraction of primary and secondary phase to calculate some quantity. My case has two phases and I am using Eulerian multi phase. Please help in calling the Volume fractions I am attaching the body of the written UDF. The part which seems confusing to me is marked as red in the attached udf. Is the attached code is correct?? #include "udf.h" #include "sg_pb.h" #include "sg_mphase.h" DEFINE_PB_NUCLEATION_RA_rate_J, cell, thread) { double J, rho, A, mol_wt, P, K, C, VF_w, VF_b, T; Thread *tc = THREAD_SUPER_THREAD(thread); Thread **pt = THREAD_SUB_THREADS(tc); Thread *tp = pt[P_PHASE]; T = 300; mol_wt = 0.018; /* ......unit 'Kg/mol'*/ rho = 1000; /* ......unit 'Kg/m^3)*/ A = 6.023*pow(10,23); /* ......dimensionless*/ K = 1.3807*pow(10,-23); /* ......J K-1*/ VF_w = C_VOF(cell,pt[0]); VF_b = C_VOF(cell,pt[1]); C = (rho * VF_w* A/mol_wt); P = C*K*T; J = 150000; C_UDMI(cell, thread, 0) = VF_w; C_UDMI(cell, thread, 1) = VF_b; C_UDMI(cell, thread, 2) = C; C_UDMI(cell, thread, 3) = P; return J; } |
|
Tags |
multiphase modelling, pbm model udf, udf code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
alphaEqn.H in twoPhaseEulerFoam | cheng1988sjtu | OpenFOAM Bugs | 15 | May 1, 2016 17:12 |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 08:09 |
multiphase turbulance case floating error | harsha_kulkarni | OpenFOAM Running, Solving & CFD | 3 | February 18, 2016 06:06 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |