engrvivs
Junior Member level 3
- Joined
- Dec 12, 2006
- Messages
- 27
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,488
Hi
Is someone aware how to create an "if-then-else" type of conditional statement in HFSS? I wish to assign value to a Project or Design Variable based on a condition. More explicit, my requirement is as follows:
We are aware of creation of project/design variables in HFSS. Say, I wish to create following project variables in HFSS:
$Wt: Width of a Microstrip Transmission Line Trace,
$Lt : Length of the Microstrip Transmission Line Trace, and
$Hs: Height of the Substrate.
What I now wish to do is to create two more such variables for the Width and the Height of a Waveguide Port (that is connected on one of the edges of the microstrip trace), say Wp and Hp. Since, Wp and Hp depend on Wt and Hs, thus, I wish to create a logical expression so as to assign values for Wp and Hp, like the following logic:
if (Wt/Hs < 1)
Wp = 20*round(Wt);
Hp = round(Hs/Wt)*ceil(Hs);
else
Wp = round((Wt^3)/(Hs^2));
Hp = round(Wt);
end
Thanks in Advance!
Vivs.
Is someone aware how to create an "if-then-else" type of conditional statement in HFSS? I wish to assign value to a Project or Design Variable based on a condition. More explicit, my requirement is as follows:
We are aware of creation of project/design variables in HFSS. Say, I wish to create following project variables in HFSS:
$Wt: Width of a Microstrip Transmission Line Trace,
$Lt : Length of the Microstrip Transmission Line Trace, and
$Hs: Height of the Substrate.
What I now wish to do is to create two more such variables for the Width and the Height of a Waveguide Port (that is connected on one of the edges of the microstrip trace), say Wp and Hp. Since, Wp and Hp depend on Wt and Hs, thus, I wish to create a logical expression so as to assign values for Wp and Hp, like the following logic:
if (Wt/Hs < 1)
Wp = 20*round(Wt);
Hp = round(Hs/Wt)*ceil(Hs);
else
Wp = round((Wt^3)/(Hs^2));
Hp = round(Wt);
end
Thanks in Advance!
Vivs.