|
[Sponsors] |
Want help regarding the UDF that is been written in VS code related to weber number |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 20, 2017, 03:30 |
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 |
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 |
|
Tags |
dpm, particle weber number |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
[snappyHexMesh] snappyHexMesh sticking point | natty_king | OpenFOAM Meshing & Mesh Conversion | 11 | February 20, 2024 10:12 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
Compressor Simulation using rhoPimpleDyMFoam | Jetfire | OpenFOAM Running, Solving & CFD | 107 | December 9, 2014 14:38 |
[blockMesh] --> foam fatal error: | lillo763 | OpenFOAM Meshing & Mesh Conversion | 0 | March 5, 2014 11:27 |