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

Errors in melting of ice-particles in ice-slurry flow UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Boh

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 24, 2016, 09:01
Default Errors in melting of ice-particles in ice-slurry flow UDF
  #1
New Member
 
Devshi Ziyad
Join Date: Oct 2015
Posts: 10
Rep Power: 9
devshi is on a distinguished road
Kindly check the UDF for ice-particle melting in ice-slurry as given below.

I have listed the errors I am getting just below the UDF.

#include "udf.h"

#define ds = 0.0001;
#define Latent_Heat = 21000;
#define alphas = 0.1;
#define ds = 0.0001;
#define v = 1.25;
#define lambdal = 0.5034;
#define mus = 1.72 * 10 ^-5;
#define mul = 0.70354;
#define rhos = 917;
#define Cpl = 4260;
#define latent_heat = 332400;

DEFINE_MASS_TRANSFER(mastra, cell, thread,from_index, from_species_index, to_index, to_species_index)
{

real hsl, Pr, hv, Res1, Res2, Res, mass;

Thread *sol, *liq;
liq = THREAD_SUB_THREAD(thread, from_index);
sol = THREAD_SUB_THREAD(thread, to_index);

Res = ((rhos*C_U(cell, liq)*ds / mus) - (rhos*C_U(cell, sol)*ds / mus));

Pr = mul*Cpl / lambdal;

hsl = ((lambdal / ds)*(7 + (10 * alphas) + (5 * alphas ^ 2)))*(1 + (0.7*(Res^0.2)*(Pr^1.3)));

hv = (6 * alphas*hsl) / ds;

mass = (hv*((C_T(cell, liq) - C_T(cell, sol)) / Latent_Heat));

return mass;
}


Error: F:\\devshi\\pipe\\pipe_files\\dp0\\FFF\\Fluent\\ma stra.c: line 24: parse error.
Error: F:\\devshi\\pipe\\pipe_files\\dp0\\FFF\\Fluent\\ma stra.c: line 24: invalid type for pointer dereference: float.


Line 24 is: Res = ((rhos*C_U(cell, liq)*ds / mus) - (rhos*C_U(cell, sol)*ds / mus));

Kindly help to solve these errors.
devshi is offline   Reply With Quote

Old   November 24, 2016, 12:24
Default
  #2
Boh
Member
 
Join Date: Sep 2016
Posts: 33
Rep Power: 8
Boh is on a distinguished road
I think you should write mus=1.72e-5
Boh is offline   Reply With Quote

Old   November 25, 2016, 01:25
Default
  #3
New Member
 
Devshi Ziyad
Join Date: Oct 2015
Posts: 10
Rep Power: 9
devshi is on a distinguished road
That still not having any effect on errors.
devshi is offline   Reply With Quote

Old   November 28, 2016, 13:45
Default
  #4
Boh
Member
 
Join Date: Sep 2016
Posts: 33
Rep Power: 8
Boh is on a distinguished road
removing the equals in the #define ?
devshi likes this.
Boh is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 08:09
Multiphase Ice slurry with melting model mohibanwar FLUENT 0 March 5, 2016 02:45
UDF problems with porous flow Nicolastheterminator Fluent UDF and Scheme Programming 0 April 8, 2014 10:12
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 22:31


All times are GMT -4. The time now is 20:06.