|
[Sponsors] |
what is the syntax for writing inverse hyperbolic functions in UDFs ANSYS FLUENT |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 1, 2016, 03:05 |
what is the syntax for writing inverse hyperbolic functions in UDFs ANSYS FLUENT
|
#1 |
New Member
krishna murthy
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
hi
i am writing a UDF(FLUENT) for VISCOSITY, in which the equation contains inverse hyperbolic function of sin. what is the syntax for the inverse hyperbolic functions. Thanks in advance Last edited by murthya3; March 1, 2016 at 08:38. |
|
March 1, 2016, 05:30 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The function for the inverse hyperbolic function of sin is asinh(x), and you may need to include the math library:
Code:
#include "math.h" |
|
March 1, 2016, 08:28 |
|
#3 | |
New Member
krishna murthy
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
Quote:
although, i add math library to my UDF i am getting error like" unresolved external symbol asinh referenced in function cell_viscosity", any library i need to add? the usage of 'asinh' in the following equation Flow_stress=(1/alpha)*(asinh(pow((Z/A),(1/n)))); |
||
March 1, 2016, 17:19 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
I've tested the asinh function with and without including the math header file and it worked fine both times (possibly this function is included elsewhere in Fluent as well). First, add trailing dots to your numbers (for example, "1.") so the fractions aren't rounded incorrectly. Second, try solving a simpler number: asinh(5) which should return 2.31...
I've now tried interpreting the UDF and it's returning the same error. Compile your UDFs. |
|
March 2, 2016, 01:59 |
|
#5 | |
New Member
krishna murthy
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
Quote:
i have tried everything what you have posted. still i am getting same error. Here i am posting my program please tell me where i made mistake. and also i am getting error: 'not all control paths return a value' Last edited by murthya3; March 15, 2016 at 05:11. |
||
March 2, 2016, 10:13 |
|
#6 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
Quote:
return Flow_stress; |
||
March 2, 2016, 10:47 |
|
#7 | |
New Member
krishna murthy
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
Quote:
i have written logarithamic formula for an inverse hyperbolic sine function, but while running it flow is getting reversed, without UDF which means with a constant value of viscosity flow is taking place by keeping boundary conditions same. What would be the reason? Thanks. |
||
March 2, 2016, 10:49 |
|
#8 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
||
March 2, 2016, 15:04 |
|
#9 | |
New Member
krishna murthy
Join Date: Mar 2016
Posts: 7
Rep Power: 10 |
Quote:
yes I did it, and the flow is reversed as stated in previous post. is that program is correct for getting strain rate from each cell, evaluating viscosity and assigning viscosity to the cell? |
||
March 2, 2016, 16:35 |
|
#10 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
looking for a smart interface matlab fluent | chary | FLUENT | 24 | June 18, 2021 10:07 |
UDF Defining in ANSYS FLUENT 16.2 in Win 10 | Sadegh.A | Fluent UDF and Scheme Programming | 11 | February 15, 2017 15:45 |
2-way FSI in Ansys CFX 15 | LucasGasparino | CFX | 3 | August 6, 2015 04:17 |
Problem in using parallel process in fluent 14 | Tleja | FLUENT | 3 | September 13, 2013 11:54 |
problem in using parallel process in fluent 14 | aydinkabir88 | FLUENT | 1 | July 10, 2013 03:00 |