|
[Sponsors] |
November 29, 2018, 09:14 |
user defined function
|
#1 |
New Member
sree charan teja
Join Date: Oct 2018
Posts: 8
Rep Power: 8 |
hi guys,
I am facing an error called no function prototype. can you guys please help me with that. my code is #include "udf.h" DEFINE_PROFILE(heatflux,thread,nv) { int p=110.111; int i; int h[6]={123800,3033966,6067932,788100,62205,45600}; float n[0]; int num=6; face_t f; begin_f_loop(f,thread); { F_CENTROID(n,f,thread); for(i=1;i<num;i++); { F_PROFILE(f, thread, nv) = h(i) + ((h(i+1)-h(i))*(p-n(i)))/(n(i+1)-n(i)); } /*return 1;*/ } end_f_loop(f,thread); } I am trying to do piecewise linear approximation for heat flux variation along the length of the rocket nozzle. |
|
December 3, 2018, 00:25 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Code:
DEFINE_PROFILE(heatflux,thread,nv) { real p=110.111; int i; real h[]={123800,3033966,6067932,788100,62205,45600}; real n[]={123800,3033966,6067932,788100,62205,45600}; int num=6; face_t f; begin_f_loop(f,thread); { F_CENTROID(n,f,thread); for(i=1;i<num;i++); { F_PROFILE(f, thread, nv) = h[i] + ((h[i+1]-h[i])*(p-n[i]))/(n[i+1]-n[i]); } } end_f_loop(f,thread); } |
|
December 3, 2018, 02:26 |
|
#3 |
New Member
sree charan teja
Join Date: Oct 2018
Posts: 8
Rep Power: 8 |
Thank you @Alexanderz
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] Errors during blockMesh meshing | Madeleine P. Vincent | OpenFOAM Meshing & Mesh Conversion | 51 | May 30, 2016 11:51 |
How to use date from previous time step in user defined field function? | samantkumarnagraj | STAR-CCM+ | 2 | December 12, 2014 07:08 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 07:42 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
Help: user defined function | alice | FLUENT | 3 | December 13, 2000 01:10 |