CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > CFD Freelancers

Want help regarding the UDF that is been written in VS code related to weber number

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 20, 2017, 02:30
Post Want help regarding the UDF that is been written in VS code related to weber number
  #1
New Member
 
Sarat
Join Date: May 2017
Posts: 1
Rep Power: 0
saratunni07 is on a distinguished road
Kindly provide me suggestions related to a UDF that has been wrote in Visual Studio Code. I need suggestions on the code whether its right or need restructuring. It has to be hooked up in DPM user scalars for obtaining weber number so that i can understand the wall film interaction.

#include "udf.h"
#define DPM_SURFTEN 0.065

DEFINE_INIT(weber_setup,domain)
{
/* if memory for the particle variable titles has not been
* allocated yet, do it now */
if (NULLP(user_particle_vars)) Init_User_Particle_Vars();
/* now set the name and label */
strcpy(user_particle_vars[0].name,"weber-number");
strcpy(user_particle_vars[0].label,"Weber Number");
strcpy(user_particle_vars[1].name,"weber-number-0");
strcpy(user_particle_vars[1].label,"Weber Number 0");
}

/* update the user scalar variables */
DEFINE_DPM_SCALAR_UPDATE(weber_number,cell,thread, initialize,p)
{
if (initialize)
{
/* this is the initialization call, set:
* P_USER_REAL(p,0) contains the weber number, initialize to 0 */
P_USER_REAL(p,0) = 0.;
}
else
{
real p_vel=sqrt(P_VEL(p)[0]^2+P_VEL(p)[1]^2+P_VEL(p)[2]^2);
P_USER_REAL(p,0)=P_RHO(p)*(p_vel^2)*P_DIAM(p)/DPM_SURFTEN(p);
}
}

Kindly help.

Thanks Sarat
saratunni07 is offline   Reply With Quote

Reply

Tags
dpm, particle weber number

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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 07:56
[snappyHexMesh] snappyHexMesh sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 09:12
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 13:38
[blockMesh] --> foam fatal error: lillo763 OpenFOAM Meshing & Mesh Conversion 0 March 5, 2014 10:27


All times are GMT -4. The time now is 13:55.