|
[Sponsors] |
how to define a function that outputs vector instead of scalar? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 14, 2017, 13:36 |
how to define a function that outputs vector instead of scalar?
|
#1 |
Senior Member
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18 |
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 |
|
August 16, 2017, 06:01 |
|
#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. |
|
August 16, 2017, 10:47 |
|
#3 |
Senior Member
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18 |
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 |
|
August 17, 2017, 06:09 |
|
#4 |
Senior Member
Cees Haringa
Join Date: May 2013
Location: Delft
Posts: 607
Rep Power: 0 |
||
Tags |
array, function, scalar, udf, vector |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
access to member function variable | Rahand | OpenFOAM Programming & Development | 3 | March 29, 2016 16:46 |
solving passive scalar by user function in AVLFIRE | huyp | Main CFD Forum | 0 | September 4, 2008 11:21 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 07:27 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 14, 2000 00:03 |
UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 11, 2000 04:43 |