|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Gino Parisella
Join Date: Mar 2017
Location: Perth, Western Australia
Posts: 22
Rep Power: 10 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Gino Parisella
Join Date: Mar 2017
Location: Perth, Western Australia
Posts: 22
Rep Power: 10 ![]() |
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 |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF syntax error | Ratel | Fluent UDF and Scheme Programming | 4 | May 23, 2015 06:15 |
what is syntax error : missing ')' before ';' | aleisia | Fluent UDF and Scheme Programming | 8 | March 10, 2015 16:42 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) | Yogini | Fluent UDF and Scheme Programming | 7 | October 3, 2012 08:24 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |