We are using a very simple tcl function to evaluate functions of the coordinates:
Code: Select all
proc EvalDirichletCondition { value x y z } {
set result 0.0
if { [catch { set result [format "%14.6f" [expr $value]] }]!=0} {
WarnWinText "Error in Dirichlet boundary conditions!"
}
return $result
}
Code: Select all
*Set Cond PLCD_Initial_Velocity_2D *nodes
*loop nodes *OnlyInCond
*set var x =NodesCoord(1)
*set var y =NodesCoord(2)
*set var z =NodesCoord(3)
[b]*format "%i %i%i %i %i"[/b]
*NodesNum *tcl(FemussEvalDirichletCondition *cond(Value_velocity_x) *x *y *z) *tcl(FemussEvalDirichletCondition *cond(Value_velocity_y) *x *y *z)
*end
Error in base file ...: Bad integer format
Thank you for your help on this,
Kind regards,
Joan