CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

dpm volume fraction in udf

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By mps

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 16, 2015, 09:50
Default dpm volume fraction in udf
  #1
mps
New Member
 
Mostafa
Join Date: Jan 2015
Posts: 4
Rep Power: 11
mps is on a distinguished road
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);
}
}
BlnPhoenix and souza.emer like this.
mps is offline   Reply With Quote

Old   November 13, 2018, 15:50
Exclamation Is this verified to work well?
  #2
Member
 
Rishikesh
Join Date: Apr 2016
Posts: 63
Rep Power: 9
mrishi is on a distinguished road
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.
mrishi is offline   Reply With Quote

Old   July 26, 2019, 13:35
Default
  #3
Member
 
Emerson
Join Date: May 2018
Posts: 35
Rep Power: 7
souza.emer is on a distinguished road
Quote:
Originally Posted by mps View Post
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);
}
}
Thank you very very much sr!
souza.emer is offline   Reply With Quote

Reply


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
UDF for volume fraction sirpolar Fluent UDF and Scheme Programming 41 June 21, 2018 23:15
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 15 May 1, 2016 16:12
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 21:14
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 10:37.