macro OuterPlunger define(PlungerOuterRadius, @arg1 ) define(PlungerAngle, eval(@arg2*@pi/180) ) # Argument of the call -gbor material= 0 origin= (eval(cos(PlungerAngle)*OuterRadius),\ eval(sin(PlungerAngle)*OuterRadius),\ 0) zprimedirection= (eval(-cos(PlungerAngle)),\ eval(-sin(PlungerAngle)),\ 0) rprimedirection= (0,0,1) range= (0,360) clear # point= (z,r) point= (50e-3,0) point= (50e-3, PlungerOuterRadius ) point= (50e-3, PlungerOuterRadius ) point= (-235.39e-3, PlungerOuterRadius) point= (-235.39e-3, 50e-3) point= (-235.39e-3, 0) doit endmacro # OuterPlungerWe now model each of our two plungers with two calls:
# # Model the tube and the plunger at phi=17 degrees: # call OuterPlunger(eval(130.75e-3/2) , 17 ) call InnerPlunger(eval(OuterRadius-50e-3), 17 ) # # model the tube and the plunger at phi=-90+22.5 degrees: # call OuterPlunger(eval(110e-3/2) , eval(-90+22.5) ) call InnerPlunger(eval(OuterRadius-50e-3), eval(-90+22.5) )The so edited inputfile can be found as /usr/local/gd1/Tutorial-SRRC/wPlunger01.gdf. When we feed gd1 with this inputfile, we get a screen as shown in figure 5.6.
![]() |