|
[Sponsors] |
July 12, 2014, 12:24 |
|
#41 |
Member
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15 |
||
July 13, 2014, 22:18 |
|
#42 |
Member
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15 |
Hi Friends
I wrote this code, please can someone tell me if my UDF was correct, and if there are errors, you could fix it. thank you PHP Code:
help me please error line 16: c: undeclared variable. |
|
July 14, 2014, 04:05 |
|
#43 | |
New Member
Marco Dc
Join Date: Feb 2014
Location: Italy
Posts: 20
Rep Power: 12 |
Quote:
and then you have used thread in begin_f_loop(f, thread) and in end_f_loop(f,thread). You have to decide. Use t or thread in both. Let's try as follow, it should work. I hope PHP Code:
__________________
Marco |
||
July 14, 2014, 09:02 |
|
#44 | |
Senior Member
Rick
Join Date: Oct 2010
Posts: 1,016
Rep Power: 27 |
Quote:
your equations look completely different in respect of what you posted before.. You are using c in the C_T(c,t) which is your cell temperature but you are not declaring what is c (as the description of error); you are using c (cell) inside and f (face) loop. If you want the mean of the temperature of the pcm domain you have to first do a c loop over the pcm domain and calculate the mean temperature, then use the f loop to calculate the boundary profile. Also this "if(Tam<Tpv<Tm)" should be "if (Tpv>Tam) && (Tpv<Tm)". And also C langiage is case sensitive: time is different than Time, and you are not declaring what is Time. "Tpv=Tm" assigns Tm to Tpv: it should be Tpv==Tm. Daniele PS: Condition Tam<Tpv<Tm will never be possible because you defined Tm<Tam!! Last edited by ghost82; July 14, 2014 at 10:05. |
||
July 14, 2014, 18:48 |
|
#45 |
Member
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15 |
Hi
I changed the equation for the heat flux exerted on the pvhotovoltaique PANEL, an attached image shows the equation |
|
July 17, 2014, 17:55 |
|
#46 |
Member
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15 |
HTML Code:
#include "udf.h"
DEFINE_PROFILE(heatflux_profile, t, F, i)
{
face_t f;
real It=750;
real H=232000;
real Tam=300;
real Tm=298.6;
real Ul=20;
real Eta=0.16;
real m=2;
real cs=1.4;
real cl=1.8;
real temp;
temp = F_T(f,t);
real Time;
Time = RP_Get_Real("physical-time-step");
begin_f_loop(f, t)
{
if((temp>Tam) && (temp<Tm)
F_PROFILE(f,t,i) = Ul*(temp*Tam) *time+Eta*It*Time+m*cs*(temp-Tam);
else if(temp==Tm)
F_PROFILE(f,t,i) = Ul*(temp*Tam)*time+Eta*It*Time+m*cs*(Tm-Tam)+H;
else(temp>Tm)
F_PROFILE(f,t,i) = Ul*(temp*Tam)*time+Eta*It*Time+m*cs*(Tm-Tam)+H+m*cl*(temp-Tm);
}
end_f_loop(f,t)
}
|
|
July 18, 2014, 08:16 |
|
#47 |
Member
David
Join Date: Aug 2012
Posts: 48
Rep Power: 14 |
Do you keep getting the same error?
|
|
July 18, 2014, 13:16 |
|
#48 |
Member
Mohamed
Join Date: Jan 2011
Location: Algeria
Posts: 46
Rep Power: 15 |
||
June 21, 2015, 04:08 |
|
#49 | |
Member
Shane
Join Date: Oct 2009
Posts: 52
Rep Power: 17 |
Quote:
Thanks Shane |
||
June 21, 2015, 11:47 |
|
#50 |
New Member
Ericson
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
Need help!!
i got this message when i'm trying to compile my udf can anyone solve this error message? |
|
June 22, 2015, 05:01 |
|
#51 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Yes. Look at you code, and check lines 3, 4 and 11, something is wrong there.
|
|
June 22, 2015, 09:57 |
|
#52 |
New Member
Ericson
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
This is my code, i don't know what is wrong here..
can you find the mistakes sir? |
|
June 22, 2015, 09:59 |
|
#53 |
New Member
Ericson
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
I'm trying to make code for rolling motion of ship..
|
|
June 22, 2015, 10:19 |
|
#54 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Yes I can, and I can show you how. Just read the error messages!
The first error you get says that there are not enough actual parameters in line 3. So, go ahead, count how many parameters you have (hint: "roll" is a parameter, "dt" is a parameter, "omega" is a parameter, "time" is a parameter and "dtime" is a parameter.) Then look up in the help how many parameters there should be, and you will see something you did wrong. |
|
June 22, 2015, 10:57 |
|
#55 |
New Member
Ericson
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
can you fix my code please?
i can't see what i must doing in help.. |
|
June 22, 2015, 11:01 |
|
#56 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Seriously?
Ok, you are using the macro "DEFINE_CG_MOTION". Look up in the help how many parameters that needs... |
|
June 23, 2015, 02:00 |
|
#57 |
New Member
Ericson
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
i've trying to fixed my codes but when i'm compiling i have another error like this...
|
|
June 23, 2015, 03:44 |
|
#58 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
I don't understand why you send me a private message telling that you use notepad.
Using notepad does not prevent you from opening the Fluent manual, and looking at how the macro "DEFINE_CG_MOTION" should be used. Do you know how to open the Fluent manual? Do you know how to search in the Fluent manual? |
|
June 23, 2015, 09:31 |
|
#59 |
New Member
Ericson
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
yes i can,, i have seen fluent manual and i have fixed my code..
but when i'm compiling the code again, i got error messages above.. what should i do? |
|
June 23, 2015, 09:49 |
|
#60 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
I am not paranormal, so if you don't show your code I can never know what is wrong.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
please help UDF for velocity profile in y-directio | raju | Fluent UDF and Scheme Programming | 6 | April 13, 2019 00:21 |
UDF error - parabolic velocity profile - 3D turbine | Zaqie | Fluent UDF and Scheme Programming | 9 | June 25, 2016 20:08 |
defining temperature profile with UDF | mohammadkm | Fluent UDF and Scheme Programming | 11 | July 3, 2013 01:15 |
UDF temp. profile BC | Shashikant | FLUENT | 0 | June 24, 2006 04:16 |
temperature profile on boundary | sivakumar | FLUENT | 5 | November 24, 2002 01:58 |