CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF with function call

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2016, 04:07
Default UDF with function call
  #1
New Member
 
Alex
Join Date: Sep 2015
Posts: 8
Rep Power: 10
Alex41 is on a distinguished road
Hello everyone,

I'm quite new with ANSYS UDF. I tried to write a EXECUTE at end function to calculate fluid force on a body at the end of each time step but I have an issue.
In this DEFINE_EXECUTE_AT_END I call a function Bilinear_Interpolation(....) to calculate additional force but my return result is different from the value of the result variable.
The structure of the UDF is:
declaration of variable
DEFINE_EXCUTE_AT_END
{
additional force=Bilinear_Interpolaton(...);
}

real Bilinear_interpolation(...)
{
real ResultFunction;
calculations....
ResultFunction=...;

return ResultFunction;
}

And for example at the end, ResultFunction=12 and additional force=37

Do you have any idea of what is wrong?

Kind regards,

Alex
Alex41 is offline   Reply With Quote

Old   February 8, 2021, 02:54
Default
  #2
New Member
 
Marcelo Ruiz
Join Date: Feb 2021
Location: Italy
Posts: 17
Rep Power: 5
CFDavatar is on a distinguished road
Hello, I want to do the same. Did you figure it out?
CFDavatar is offline   Reply With Quote

Old   February 8, 2021, 14:53
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Quote:
Originally Posted by CFDavatar View Post
Hello, I want to do the same. Did you figure it out?
So you have the same problem as Alex41?
Interesting!

How did you find out that the two values are different? Alex41 did not mention this.
pakk is offline   Reply With Quote

Reply


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
Any experts on FFTW? jinhua2015 Main CFD Forum 3 May 22, 2022 19:44
Compiling User Fortran with CFX 14.0 on Win64 Raijin Thunderkeg CFX 29 March 9, 2016 11:45
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 13:41
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 10:20
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42


All times are GMT -4. The time now is 08:07.