
[Sponsors] 
User Defined Material Equation  Error message 

LinkBack  Thread Tools  Search this Thread  Display Modes 
July 27, 2018, 06:41 
User Defined Material Equation  Error message

#1 
New Member
Join Date: Mar 2017
Posts: 25
Rep Power: 9 
Hello.
Right now i'm trying to define own material properties in Ansys CFX (R19) using the value option and equations depending on pressure and temperature. For example my equation for specific heat at constant pressure is looking like this: Code:
(4.105976721700E+003+1.061520419350E005*(p*1 [Pa^1])+8.513734104789E012*((p*1 [Pa^1])^2)1.838534834997E016*((p*1 [Pa^1])^3)5.325809123258E+000*(T*1 [K^1])1.002737641102E007*(T*1 [K^1])*(p*1 [Pa^1])+1.632147648588E007*(T*1 [K^1])*((p*1 [Pa^1])^2)1.573807426520E024*(T*1 [K^1])*((p*1 [Pa^1])^3)+2.284578823171E002*((T*1 [K^1])^2)+3.118097032835E010*((T*1 [K^1])^2)*(p*1 [Pa^1])1.966729989433E019*((T*1 [K^1])^2)*((p*1 [Pa^1])^2)+1.430074218860E017*((T*1 [K^1])^2)*((p*1 [Pa^1])^3)2.428562434427E005*((T*1 [K^1])^3)3.229774746216E013*((T*1 [K^1])^3)*(p*1 [Pa^1])+3.663732513675E012*((T*1 [K^1])^3)*((p*1 [Pa^1])^2)+1.181683926195E029*((T*1 [K^1])^3)*((p*1 [Pa^1])^3)) [J kg^1 K^1] Now when i apply the material to my model the solver crashes while initializing showing: Code:
Fatal bounds error detected  Variable: Specific Heat Capacity at Constant Pressure Locale : ++  Writing crash recovery file  ++ Details of error:  Error detected by routine MAKDAT CDANAM = LVAR CDTYPE = INTR ISIZE = 136 CRESLT = OLD Current Directory : /FLOW/ALGORITHM/ZN1/SYSTEM/VARIABLES ++  An error has occurred in cfx5solve:     The ANSYS CFX solver exited with return code 1. No results file   has been created.  ++ End of solution stage. My first attempts to solve this problem on my own where going from an arbitrary constant value for the heat capacity to more complex polynomials. In this regard i figured out that this: Code:
(39000.01*T*1[K^1])[J kg^1 K^1] Code:
(39000.01*(T*1[K^1])^2)[J kg^1 K^1] Code:
(39000.01*T^2*1[K^2])[J kg^1 K^1] Maybe someone of you can give me a hint what i am doing wrong with the higher term dependencies. Right now im running out of ideas to solve this problem. Thanks in advance! bastian. 

July 27, 2018, 07:54 

#2 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,830
Rep Power: 144 
CFX uses your functions to generate a table of values, and it uses that table of values in the simulation. The table has user settable maximum and minimum values and your function looks like it goes haywire as it approaches the maximum and minimum values.
So I recommend you look at the table generation settings in the materials tab. Set the maximum and minimum values to cover the range expected in your simulation. You will find the default values are very wide.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. 

July 27, 2018, 09:46 

#3 
New Member
Join Date: Mar 2017
Posts: 25
Rep Power: 9 
Hello ghorrocks,
at first thank you for your answer. That was also one of my first attempts before i tried switching to the described stepwise expansion of the polinomial. But also with an appropriate range in pressure and temperature (cf. picture below) and several tries changing the the maximum points or switching on/off the extrapolation settings it ends in the described error. Leaving the first (full) equation beside im curious about that the simple attempt with T^1 runs without any problems while the simple change to the next higher polynomial T^2 leads into the error. Its driving me nuts.. 

July 27, 2018, 12:08 

#4 
Senior Member
Join Date: Jun 2009
Posts: 1,860
Rep Power: 33 
Material properties are not for the faint of the heart. It requires a lot of patience and being aware of the thermodynamic requirements.
Noticed your specific heat capacity is a function of pressure. Do you have a consistent set of properties? Cp has a strong relationship with the equation of state, i.e. rho(T,p). Have you read the documentation section CFXSolver Theory Guide/Chapter 1: Basic Solver Capability Theory  1.2. Governing Equations/Equation of State/General Equation of State If your equations are not thermodynamically consistent, the generation of the tables is nearly impossible. You may manage to create one by reducing the tolerances, but you will be pushing the problem downstream during the solution of the discrete equations. The model may never converge, since it cannot satisfy thermodynamics, regardless of timestep or any trick to force it to do so. In your simple case, Cp = f(T^2), is the set of properties consistent? are the table generation controls appropriate for the integration in the solution range you expect the iterative process to occur? Hope the above helps 

July 30, 2018, 09:49 

#5 
New Member
Join Date: Mar 2017
Posts: 25
Rep Power: 9 
Thank you for your reply.
In fact i didn't know that there has to be an exact consistency between cp and rho which exactly seems to be the key to my problem. Against the background of my project i need properties for a cooling fluid containing water and monoethyleneglycol (mixture: 80/20). So i used a curve fitting algorithm to get equations for the particular properties on base of tabulated values generated with Refprop. Therefore there is surely no exact thermodynamic consistency between the individual equations. I would say  lesson learned , i have to search for another approach. Thanks for your kind help guys. 

Tags 
ansys, cfx, material in cfx pre, properties 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Multiphase flow  incorrect velocity on inlet  Mike_Tom  CFX  6  September 29, 2016 01:27 
Simple piston movement in cylinder fluid models  arun1994  CFX  4  July 8, 2016 02:54 
Calculation of the Governing Equations  Mihail  CFX  7  September 7, 2014 06:27 
error message  cuteapathy  CFX  14  March 20, 2012 06:45 
Check particle impaction with User Fortran  Julian K.  CFX  3  January 12, 2012 09:46 