CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

User Defined Material Equation - Error message

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 27, 2018, 06:41
Question User Defined Material Equation - Error message
  #1
New Member
 
Join Date: Mar 2017
Posts: 25
Rep Power: 9
.bastian is on a distinguished road
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.061520419350E-005*(p*1 [Pa^-1])+8.513734104789E-012*((p*1 [Pa^-1])^2)-1.838534834997E-016*((p*1 [Pa^-1])^3)-5.325809123258E+000*(T*1 [K^-1])-1.002737641102E-007*(T*1 [K^-1])*(p*1 [Pa^-1])+1.632147648588E-007*(T*1 [K^-1])*((p*1 [Pa^-1])^2)-1.573807426520E-024*(T*1 [K^-1])*((p*1 [Pa^-1])^3)+2.284578823171E-002*((T*1 [K^-1])^2)+3.118097032835E-010*((T*1 [K^-1])^2)*(p*1 [Pa^-1])-1.966729989433E-019*((T*1 [K^-1])^2)*((p*1 [Pa^-1])^2)+1.430074218860E-017*((T*1 [K^-1])^2)*((p*1 [Pa^-1])^3)-2.428562434427E-005*((T*1 [K^-1])^3)-3.229774746216E-013*((T*1 [K^-1])^3)*(p*1 [Pa^-1])+3.663732513675E-012*((T*1 [K^-1])^3)*((p*1 [Pa^-1])^2)+1.181683926195E-029*((T*1 [K^-1])^3)*((p*1 [Pa^-1])^3)) [J kg^-1 K^-1]
All other equations are of similar shape with sometimes lower or higher polinomial degrees.

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.
With any suitable standard material a solution is generated without any problem.

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:
(3900-0.01*T*1[K^-1])[J kg^-1 K^-1]
worked without any problems, while changing it to a term of higher power:
Code:
(3900-0.01*(T*1[K^-1])^2)[J kg^-1 K^-1]
or also
Code:
(3900-0.01*T^2*1[K^-2])[J kg^-1 K^-1]
is leading to the described crash.

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.
.bastian is offline   Reply With Quote

Old   July 27, 2018, 07:54
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,830
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   July 27, 2018, 09:46
Default
  #3
New Member
 
Join Date: Mar 2017
Posts: 25
Rep Power: 9
.bastian is on a distinguished road
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..

.bastian is offline   Reply With Quote

Old   July 27, 2018, 12:08
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,860
Rep Power: 33
Opaque will become famous soon enough
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

CFX-Solver 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
Opaque is offline   Reply With Quote

Old   July 30, 2018, 09:49
Default
  #5
New Member
 
Join Date: Mar 2017
Posts: 25
Rep Power: 9
.bastian is on a distinguished road
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 mono-ethylene-glycol (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.
.bastian is offline   Reply With Quote

Reply

Tags
ansys, cfx, material in cfx pre, properties

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
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


All times are GMT -4. The time now is 22:40.