|
[Sponsors] |
September 16, 2015, 10:50 |
dpm volume fraction in udf
|
#1 |
New Member
Mostafa
Join Date: Jan 2015
Posts: 4
Rep Power: 11 |
I have seen some people looking for dpm_vof as a macro in udf. I provided the following udf, writing dpm-vof of each cell in an udm. I hope everybody finds it useful
DEFINE_ADJUST(dpm_vof, domain) { real Rop; cell_t c; Thread *t; Particle *p; Injection *Ilist = Get_dpm_injections(); Injection *I; loop(I, Ilist) { loop(p, I->p) { Rop = P_RHO(p); } } thread_loop_c(t, domain) { begin_c_loop(c, t) { C_UDMI(c, t, 0) = C_DPMS_CONCENTRATION(c, t) / Rop; //dpm_vof saved in a udm //this macro works as well: C_STORAGE_R(c, t, SV_DPMS_CONCENTRATION) } end_c_loop(c, t); } } |
|
November 13, 2018, 16:50 |
Is this verified to work well?
|
#2 |
Member
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 10 |
Sorry to pull up an old post.
But I am facing problems in implementing a very similar piece of code. I store the value of C_DPMS_CONCENTRATION(c,t) in C_UDSI(c,t,0) but when I plot value of this scalar I obtain garbage values (negative values and values which are not same as the variable DPM Concentration available in contour list). i cannot understand the reason. |
|
July 26, 2019, 14:35 |
|
#3 | |
Member
Emerson
Join Date: May 2018
Posts: 35
Rep Power: 8 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for volume fraction | sirpolar | Fluent UDF and Scheme Programming | 41 | June 22, 2018 00:15 |
alphaEqn.H in twoPhaseEulerFoam | cheng1988sjtu | OpenFOAM Bugs | 15 | May 1, 2016 17:12 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 06:42 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |