How to resolve “WARNING: Invalid cp (-2.235390e+03 J/kgK) for gadolinium at temperature 1.000000 K”?
-
-
October 27, 2020 at 2:17 am
pc_singh
SubscribernI am getting WARNING: Invalid cp (-2.235390e+03 J/kgK) for gadolinium at temperature 1.000000 K error. I have compiled specific heat udf. nCan someone correct the udf below? Please Suggest Changes Required.nDEFINE_SPECIFIC_HEAT(CP, T, Tref, h, yi)n{ntreal CP_0, CP_1, CP, CP_dot5, B, Time;nt/*Setting up the magnetic field*/ntTime = CURRENT_TIME;ntfor(;n {n tif(Time<=4.2)n ttbreak;n tTime=Time-4.2;n t}n if(Time<=0.1)n tttB=7*Time+0.3;n tttif(Time<=2.1 && Time>0.1)n tttB=1;n tttif(Time>2.1 && Time<=2.2)n tttB=-7*Time+15.7;n tttif(Time>2.2)n tttB=0.3;tn /*Calculating CP*/n if(T<=288.60 )n CP_0=0.017275*T*T-7.201999*T+984.900000004;nt elsent {nt if(T<=292.4866)nt tCP_0=-27.98559*T+8431.999941;nt elsent tCP_0=0.02421075*T*T-16.2260213*T+2916.68679;n t}n if(T<=287.0577)n CP_dot5=54.7513501*exp(0.00615364381*T);nt elsent {nt if(T<=292.4247)nt tCP_dot5=0.14988*T*T-94.2584*T+15031.3045;nt elsent tCP_dot5=0.150563*T*T-94.47235*T+15032.60325;n t}tn if(T<=287.4382)n CP_1=-0.0408*T*T+23.65002936*T-3125.9999;nt elsent {nt if(T<=298.1055)nt tCP_1=-0.1694534*T*T+96.069998*T-13314;nt elsent tCP_1=0.1209901*T*T-76.7138035*T+12379.99999;n t}tn if(B<=0.5)n t CP=CP_0+(CP_dot5-CP_0)*(B/0.5);n telsen t CP=CP_dot5+(CP_1-CP_dot5)*((B-0.5)/0.5);n t Message(The value of CP is %g
,CP);nn *h = CP*(T-Tref);nt return CP;tn} n -
October 27, 2020 at 7:55 am
Amine Ben Hadj Ali
Ansys EmployeeHave you checked the values of Cp outside Fluent?nYou can first help the solver by limiting the temperature for the first iteration to a reasonable narrow interval.n -
October 27, 2020 at 9:33 am
pc_singh
SubscriberThank you for your kind reply.nHow can I limit the temperature for the first iteration?n -
October 27, 2020 at 10:16 am
-
October 27, 2020 at 11:31 am
pc_singh
SubscriberSir, still getting same error.nnWARNING: Invalid cp (-8.863752e+00 J/kgK) for gadolinium at temperature 20.000000 K -
October 27, 2020 at 11:40 am
Rob
Forum ModeratorIf you put 20K into the cp formula what do you get? I also suggested 20K BELOW your expected minimum temperature, not 20K temperature. n -
October 27, 2020 at 11:48 am
pc_singh
Subscribersir I have checked it on 280K and 290K too, but got same error.nBy manual calculation, I am getting positive value at 20K.n -
October 27, 2020 at 1:28 pm
Amine Ben Hadj Ali
Ansys EmployeeFurther details required about the case: mixture properties or single component flow? Are you seeing the error after initialization? (Please do not attach pictures just include them in the answer)n -
October 28, 2020 at 10:20 am
pc_singh
SubscriberCase scenario : Flow of water between parallel plates of Gadolinium( Gd). The specific heat of Gd is property of both the temperature and magnetic field. No sir, I am seeing this error during simulation.n -
October 28, 2020 at 10:35 am
Rob
Forum ModeratorIn Excel plot the whole temperature range to see what's going on. -
October 28, 2020 at 10:48 am
pc_singh
Subscriberafter simulation?n -
October 28, 2020 at 11:10 am
Rob
Forum ModeratorNo, plot the relationship you've put into the UDF. Whenever you need 9+ significant figures in a relationship there's a good chance something will go wrong. n -
October 28, 2020 at 11:56 am
pc_singh
SubscriberOk sir.n
-
Viewing 12 reply threads
- The topic ‘How to resolve “WARNING: Invalid cp (-2.235390e+03 J/kgK) for gadolinium at temperature 1.000000 K”?’ is closed to new replies.
Innovation Space
Trending discussions
- air flow in and out of computer case
- Varying Bond model parameters to mimic soil particle cohesion/stiction
- Eroded Mass due to Erosion of Soil Particles by Fluids
- I am doing a corona simulation. But particles are not spreading.
- Centrifugal Fan Analysis for Determination of Characteristic Curve
- Guidance needed for Conjugate Heat Transfer Analysis for a 3s3p Li-ion Battery
- Issue to compile a UDF in ANSYS Fluent
- JACOBI Convergence Issue in ANSYS AQWA
- affinity not set
- Resuming SAG Mill Simulation with New Particle Batch in Rocky
Top Contributors
-
4047
-
1467
-
1308
-
1156
-
1021
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.