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, 05:07
Default UDF with function call
  #1
New Member
 
Alex
Join Date: Sep 2015
Posts: 8
Rep Power: 11
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, 03: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, 15:53
Default
  #3
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
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 20:44
Compiling User Fortran with CFX 14.0 on Win64 Raijin Thunderkeg CFX 29 March 9, 2016 12:45
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 11:20
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42


All times are GMT -4. The time now is 18:45.