|
[Sponsors] |
April 14, 2015, 08:50 |
new viscosity model
|
#1 | |
New Member
nemo
Join Date: Jan 2015
Posts: 26
Rep Power: 11 |
Hello,
I try to implement a new temperature dependent viscosity model in which nu=a*exp(b/T)+c.Here is my code to calculate the viscosity. Quote:
Many thanks, Nemo. |
||
April 14, 2015, 08:59 |
|
#2 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
return (a_*exp(b_/T)+c_);
try to add the ; |
|
April 14, 2015, 09:17 |
|
#3 |
Senior Member
|
Hi,
And what are the types of a_, b_, and c_? If b_ is just scalar, then b_/T has units K^-1 and transcendent functions are only defined for dimensionless arguments. Also can you express "But it seems that the exp(b_/T) is not right" in compiler error? |
|
April 14, 2015, 09:17 |
|
#4 |
New Member
nemo
Join Date: Jan 2015
Posts: 26
Rep Power: 11 |
I am sorry,my carelessness.in the code there is a ; ,and the code can be compiled successfully.
|
|
April 14, 2015, 09:23 |
|
#5 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
why did you change the original post
you make me look stupid lol |
|
April 14, 2015, 09:30 |
|
#6 | ||
New Member
nemo
Join Date: Jan 2015
Posts: 26
Rep Power: 11 |
Quote:
Quote:
|
|||
April 14, 2015, 09:36 |
|
#7 |
Senior Member
|
Hi,
As the error is in Foam::divide, in general it is division by zero. Also in general T is greater than zero. In your case it seems not to be the case. To avoid division by zero, you can write denominator as T + Tsmall, where Tsmall is small dimensioned value with temperature units. Also the error can indicate diverging solution, wrong initial or boundary conditions. |
|
April 14, 2015, 09:39 |
|
#8 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
I presume you followed the example that implemented the temperature dependant power law
meaning you declared a,b like he did with kslope and Tbase if not? explain what you did one more thing, can you specify what you did in transportProperties? |
|
April 14, 2015, 09:53 |
|
#9 |
New Member
nemo
Join Date: Jan 2015
Posts: 26
Rep Power: 11 |
Hello kebsiali,I implented the viscosity model followed by this http://www.tfd.chalmers.se/~hani/kur...nFoam%20v2.pdf
,and i think i have found my mistake,i set the temperature inlet boundary condition to 0 which is not right. Thank you so much,alexeym and kebsiali. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 07:18 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 17:44 |
Validity of Sutherland's viscosity model for high-T gases | tatu | Main CFD Forum | 1 | March 6, 2013 12:00 |
modelling solids viscosity in eulerian multiphase model | derkaiser | FLUENT | 1 | December 5, 2011 03:42 |
Casson Viscosity model as one user define function | Zahra Rahmdel | FLUENT | 0 | November 6, 2004 05:53 |