|
[Sponsors] |
how to define a function that outputs vector instead of scalar? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 17 ![]() |
Hi all,
Is it possible for us to define a function in UDF that outputs a vector (array) instead of a scalar? I could not find an example. Thanks, Ali |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 ![]() |
typically, the DEFINE macro you use specifies the required output of the function. This may be a vector - for example, when using the DEFINE_VR_RATE macro the return needs to be a vector. It depends on the sort of data FLUENT is expecting.
Of course, within the UDF itself, you can use all the arrays you want. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 17 ![]() |
Thank you Cees for your reply.
Can I use DEFINE macro to define a vector field? For example whenever we want to define a scalar function, we use somthing like this: real func1(cell_t c, Threat *t){ . . . } Is there something similar to this for defining vector functions? Thanks, Ali |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 ![]() |
||
![]() |
![]() |
![]() |
Tags |
array, function, scalar, udf, vector |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
access to member function variable | Rahand | OpenFOAM Programming & Development | 3 | March 29, 2016 15:46 |
solving passive scalar by user function in AVLFIRE | huyp | Main CFD Forum | 0 | September 4, 2008 10:21 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 06:27 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 13, 2000 23:03 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 11, 2000 03:43 |