Is something like this you are referring to? (Per UDF means)
#include “udf.h”
#include “sg_mphase.h”
#include “sg_vof.h”
#include “sg.h”
DEFINE_ADJUST(norm_dist, domain)
{
#if !RP_HOST
Thread *t;
Thread **pt;
cell_t c;
int phase_domain_index = 0;
Domain *pDomain = DOMAIN_SUB_DOMAIN(domain,phase_domain_index);
{
Alloc_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_N ULL);
Scalar_Reconstruction(pDomain, SV_VOF,-1,SV_VOF_RG,NULL);
Scalar_Derivatives(pDomain,SV_VOF,-1,SV_VOF_G,SV_VOF_RG,Vof_Deriv_Accumulate);
}
mp_thread_loop_c (t,domain,pt)
{
if (FLUID_THREAD_P(t))
{
Thread *ppt = pt[phase_domain_index];
begin_c_loop (c,t)
{
if(C_VOF(c,ppt)>0.01 && C_VOF(c,ppt)<0.99)
{
C_UDMI(c,t,0)=C_VOF_G(c,ppt)[0]/NV_MAG(C_VOF_G(c,ppt));
C_UDMI(c,t,1)=C_VOF_G(c,ppt)[1]/NV_MAG(C_VOF_G(c,ppt));
C_UDMI(c,t,3)=Get_Surface_Distance(c,ppt);
}
else
{
C_UDMI(c,t,0)=0;
C_UDMI(c,t,1)=0;
C_UDMI(c,t,3)=0;
}
}
end_c_loop (c,t)
}
}
Free_Storage_Vars(pDomain,SV_VOF_RG,SV_VOF_G,SV_NU LL);
#endif
}
this was my original udf via which I am trying to store unit normal vector components and interface distance from cell centre.
OR
Is something like this you are referring to? (Per TUI command means)
/solve/set/expert
Keep temporary solver memoery being freed: Yes
Thanks and regards
Krishna