# Variables in region commmand

hi all,

I am using the variables in region command. However getting error:

variable a equal 3.5656
variable R equal 2
variable Rc1 equal 153.6824
variable Rc2 equal 15

variable f11 equal " v_Rc1 + v_R * sin 10"
variable f12 equal " v_Rc2 - v_R * cos 10"
variable f13 equal 0
variable f14 equal " v_Rsin 10 "
variable f15 equal " v_R
cos 10 "
variable f16 equal 0
region tool_edge cylinder z {Rc1} {Rc2} R INF INF region flank plane {f11} {f12} {f13} {f14} {f15} \${f16}

##### Log result

region tool_edge cylinder z {Rc1} {Rc2} R INF INF region tool_edge cylinder z 153.6824 {Rc2} \$R INF INF
region tool_edge cylinder z 153.6824 15 R INF INF region tool_edge cylinder z 153.6824 15 2 INF INF region flank plane {f11} {f12} {f13} {f14} {f15} \${f16}
ERROR: Invalid thermo keyword in variable formula (…/variable.cpp:2008)

For one region command tool_edge, it is working and for the other i.e.region flank it is not.How to use alphanumeric variables in region command?

hi all,
I am using the variables in region command. However getting error:

variable a equal 3.5656
variable R equal 2
variable Rc1 equal 153.6824
variable Rc2 equal 15

variable f11 equal " v_Rc1 + v_R * sin 10"
variable f12 equal " v_Rc2 - v_R * cos 10"
variable f13 equal 0
variable f14 equal " v_R*sin 10 "
variable f15 equal " v_R*cos 10 "
variable f16 equal 0
region tool_edge cylinder z \{Rc1\} {Rc2} R INF INF region flank plane {f11} \{f12\} {f13} \{f14\} {f15} \${f16}

##### Log result
region tool_edge cylinder z \{Rc1\} {Rc2} R INF INF region tool\_edge cylinder z 153\.6824 {Rc2} \$R INF INF
region tool_edge cylinder z 153.6824 15 R INF INF region tool\_edge cylinder z 153\.6824 15 2 INF INF region flank plane {f11} \{f12\} {f13} \{f14\} {f15} \${f16}
ERROR: Invalid thermo keyword in variable formula (../variable.cpp:2008)

For one region command tool_edge, it is working and for the other i.e.region
flank it is not.How to use alphanumeric variables in region command?

it looks to me, that the error is due to your incorrect use of "cos"
and "sin" functions.

axel.