The Movie is created via these four Commands, with the proper Inputfiles:
mkdir -p /tmp/UserName/garbage
gd1 < DeMichele.gdf
gd1.pp -ignore-profile < E-pp-in
convert -loop 0 /tmp/UserName/garbage/AbsH*.gif DeMichele.gif
The Solver gd1 is used to compute the Fields. At selected Times the magnetic Fields on metallic Patches are stored.
gd1 < DeMichele.gdf
The Postprocessor gd1.pp reads these stored Fields and writes GIF-Files.
gd1.pp < pp-in
ImageMagicks convert converts these GIF-Files to an animated GIF.
convert -loop 0 /tmp/UserName/garbage/AbsH*.gif DeMichele.gif
The Inputfile for the Solver gd1 is:
DeMichele.gdf
DeMichele-FullStruc-NomLoadOpt-27mm-ascii.stl
DeMichele-added-vacuum-NominalOpt27mm-BASE4mm-ascii.stl
DeMichele-loads-with-ext-NominalOpt27mm-BASE4mm-ascii.stl
sdefine( TMP, /tmp/UserName )
define(Zmin,0)
define(Zmax, 261.287)
define(ROuter, 97*0.8)
define(EL, 3) # a 'green' Material.
# bunch length in mm
define(SIGMA, 1.2 )
define( STPSZE, 0.185 ) # MilliMetres
-general
outfile= TMP/DeMichele-Outfile
scratch= TMP/scratch
text()= sigma: SIGMA, sigma/spacing: eval(SIGMA/STPSZE)
-mesh
#
# The Scale of all Positions and Lengths:
#
define(GEOSCALE, 1e-3)
geoscale= GEOSCALE
spacing= STPSZE
pxlow= -ROuter, cxlow= electric
pylow= -ROuter, cylow= electric
pxhigh ROuter, cxhigh= electric
pyhigh= ROuter, cyhigh= electric
pzlow= Zmin, czlow= electric
pzhigh= Zmax, czhigh= electric
#
# Define the electrical properties of the Material 'EL'
# and of Material '10'.
#
-material
material= EL, type= electric, kappa= 56e6
material= 10, type= normal, epsr= 7.778, kappa= 0.876
########
########
######## Modeling of the Device.
########
########
# Rotate all following by 45 Degrees around the z-Axis.
-transform, -rotate, axis= ( 0, 0, 1 ), angle= 45, doit
#
#
# Fill the Universe with Metal:
#
-brick
material= EL
volume= ( -INF,INF, -INF,INF, -INF,INF )
doit
#
# Definition of the main Cavities as stlfiles.
# The stlfiles must be ascii-files.
# Two possibilities: Generate the stl-Files directly as ascii-Files,
# Or use the stp2stl Utility to generate ascii-Files.
#
-stlfile
file= DeMichele-FullStruc-NomLoadOpt-27mm-ascii.stl
material= 0
xscale= 1e-3, yscale= 1e-3, zscale= 1e-3
doit
# loads
file= DeMichele-added-vacuum-NominalOpt27mm-BASE4mm-ascii.stl
material= 0
doit
-stlfile
file= DeMichele-loads-with-ext-NominalOpt27mm-BASE4mm-ascii.stl
material= 10
doit
############################################3
#
# Maybe generate a plot.
#
-volumeplot
eyeposition= ( -1.0, -2.3, 0.5 )
plotopts= -geometry 800x1004+10+10
scale= 2
doit
############
# The parameters of the time domain computation.
-fdtd
-lcharge
#
# The Properties of the exciting Line-Charge.
#
charge= 1e-12, sigma= SIGMA
xposition= 0.5
yposition= 0
shigh= 50 * 1000 # 50 Meters, not needed for the Movie.
-ports
#
# Where are absorbing Boundary Conditions:
#
plane= zlow, name= zlow, npml= 40, modes= 0, doit
plane= zhigh, name= zhigh, npml= 40, modes= 0, doit
# Store data for the Movie.
-fexport
outfile= TMP/DeMichele-honmat
what= honmat
define( FIRSTSAV, 5 * GEOSCALE * STPSZE / 3e8 )
define( DISTSAV, 10 * GEOSCALE * STPSZE / 3e8 )
firstsaved= 5 * GEOSCALE * STPSZE / 3e8
distancesaved= DISTSAV
lastsaved= FIRSTSAV + 300 * DISTSAV
doit
-fdtd
#
# Start the Time Domain Computation.
#
doit
The Inputfile for the Postprocessor gd1.pp is:
pp-in
sdefine( TMP, /tmp/UserName/garbage )
-general, scratch= TMP/scratch
-3dmanygifs
1stinfile= /tmp/UserName/DeMichele-honmat-000000004.gz
outfiles= TMP/AbsH
what= abs
uptonfiles= 270, scale= 4
mpegfile= ./DeMichele-honmat4Eye.mpeg
define( PHI, 15 * @pi / 180 )
define( THETA, (180-30) * @pi / 180 )
eyeposition= ( sin(THETA) * cos( PHI ), sin(THETA) * sin(PHI), cos(THETA) )
# specifying 'eyepos= (XX, YY, ZZ)'
# resets rotsequence, zrot, xrot, yrot to
# 'rotsequence= zxy'
# 'zrot= atan2(YY, XX)'
# 'xrot= acos( ZZ / sqrt(XX**2 + YY**2 + ZZ**2) )'
doit