|
[Sponsors] |
November 22, 2023, 04:54 |
Expressions syntax for vector component
|
#1 |
New Member
Gino Parisella
Join Date: Mar 2017
Location: Perth, Western Australia
Posts: 22
Rep Power: 9 |
I am trying to use expressions to set up initial conditions, but I have syntax issues to get components from vectors.
Example: HTML Code:
var1 #eval { vector(1, sqrt(2), 3) }; var2 #eval { vector(var1.x(), 4, 5) }; the resulting error is "Object var1.x does not exist or wrong type in expression at position...". What is the correct syntax to use a component out of a defined vector? Thank you in advance |
|
December 5, 2023, 10:21 |
need to expand the string
|
#2 |
New Member
Gino Parisella
Join Date: Mar 2017
Location: Perth, Western Australia
Posts: 22
Rep Power: 9 |
ok, I found the answer in the user guide
basically if I define a vector Code:
var1 #eval{vector(1, 5, 3)}; Code:
$[(vector) var1] Code:
var2 #eval{vector(4, $[(vector) var1].y(), 6)}; Cheers |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF syntax error | Ratel | Fluent UDF and Scheme Programming | 4 | May 23, 2015 05:15 |
what is syntax error : missing ')' before ';' | aleisia | Fluent UDF and Scheme Programming | 8 | March 10, 2015 15:42 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 03:23 |
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) | Yogini | Fluent UDF and Scheme Programming | 7 | October 3, 2012 07:24 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 15:16 |