Dear experts, I try to use a basic project of Transmittance Spectrum of a Waveguide but I always get the following error:
Main code:
; From the Meep tutorial: transmission around a 90-degree waveguide
; bend in 2d.
(define-param sx 16) ; size of cell in X direction
(define-param sy 32) ; size of cell in Y direction
(set! geometry-lattice (make lattice (size sx sy no-size)))
(define-param pad 4) ; padding distance between waveguide and cell edge
(define-param w 1) ; width of waveguide
(define wvg-ycen (* -0.5 (- sy w (* 2 pad)))) ; y center of horiz. wvg
(define wvg-xcen (* 0.5 (- sx w (* 2 pad)))) ; x center of vert. wvg
(define-param no-bend? false) ; if true, have straight waveguide, not bend
(set! geometry
(if no-bend?
(list
(make block
(center 0 wvg-ycen)
(size infinity w infinity)
(material (make dielectric (epsilon 12)))))
(list
(make block
(center (* -0.5 pad) wvg-ycen)
(size (- sx pad) w infinity)
(material (make dielectric (epsilon 12))))
(make block
(center wvg-xcen (* 0.5 pad))
(size w (- sy pad) infinity)
(material (make dielectric (epsilon 12)))))))
(define-param fcen 0.15) ; pulse center frequency
(define-param df 0.1) ; pulse width (in frequency)
(set! sources (list
(make source
(src (make gaussian-src (frequency fcen) (fwidth df)))
(component Ez)
(center (+ 1 (* -0.5 sx)) wvg-ycen)
(size 0 w))))
(set! pml-layers (list (make pml (thickness 1.0))))
(set-param! resolution 10)
(define-param nfreq 100) ; number of frequencies at which to compute flux
(define trans ; transmitted flux
(add-flux fcen df nfreq
(if no-bend?
(make flux-region
(center (- (/ sx 2) 1.5) wvg-ycen) (size 0 (* w 2)))
(make flux-region
(center wvg-xcen (- (/ sy 2) 1.5)) (size (* w 2) 0)))))
(define refl ; reflected flux
(add-flux fcen df nfreq
(make flux-region
(center (+ (* -0.5 sx) 1.5) wvg-ycen) (size 0 (* w 2)))))
; for normal run, load negated fields to subtract incident from refl. fields
(if (not no-bend?) (load-minus-flux "refl-flux" refl))
(run-sources+
(stop-when-fields-decayed 50 Ez
(if no-bend?
(vector3 (- (/ sx 2) 1.5) wvg-ycen)
(vector3 wvg-xcen (- (/ sy 2) 1.5)))
1e-3)
(at-beginning output-epsilon))
; for normalization run, save flux fields for refl. plane
(if no-bend? (save-flux "refl-flux" refl))
(display-fluxes trans refl)
error:
Initializing structure…
Working in 2D dimensions.
Computational cell is 16 x 32 x 0 with resolution 10
block, center = (-2,-11.5,0)
size (12,1,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon diagonal = (12,12,12)
block, center = (3.5,2,0)
size (1,28,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon diagonal = (12,12,12)
time for choose_chunkdivision = 0.000264168 s
time for set_epsilon = 0.136353 s
HDF5-DIAG: Error detected in HDF5 (1.10.7) thread 1:
#000: …/…/…/src/H5F.c line 429 in H5Fopen(): unable to open file
major: File accessibility
minor: Unable to open file
#001: …/…/…/src/H5Fint.c line 1644 in H5F_open(): unable to open file: time = Mon Jul 10 00:18:43 2023
, name = ‘./bend-flux-refl-flux.h5’, tent_flags = 0
major: File accessibility
minor: Unable to open file
#002: …/…/…/src/H5FD.c line 741 in H5FD_open(): open failed
major: Virtual File Layer
minor: Unable to initialize object
#003: …/…/…/src/H5FDsec2.c line 360 in H5FD__sec2_open(): unable to open file: name = ‘./bend-flux-refl-flux.h5’, errno = 2, error message = ‘No such file or directory’, flags = 0, o_flags = 0
major: File accessibility
minor: Unable to open file
terminate called after throwing an instance of ‘std::runtime_error’
what(): meep: error on line 232 of h5file.cpp: error opening HDF5 input file
Aborted
(base) root@DESKTOP-FAQVCQO:~/meep3# meep bend-flux.ctl
Initializing structure…
Working in 2D dimensions.
Computational cell is 16 x 32 x 0 with resolution 10
block, center = (-2,-11.5,0)
size (12,1,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon diagonal = (12,12,12)
block, center = (3.5,2,0)
size (1,28,1e+20)
axes (1,0,0), (0,1,0), (0,0,1)
dielectric constant epsilon diagonal = (12,12,12)
time for choose_chunkdivision = 0.000340939 s
time for set_epsilon = 0.121823 s
HDF5-DIAG: Error detected in HDF5 (1.10.7) thread 1:
#000: …/…/…/src/H5F.c line 429 in H5Fopen(): unable to open file
major: File accessibility
minor: Unable to open file
#001: …/…/…/src/H5Fint.c line 1644 in H5F_open(): unable to open file: time = Mon Jul 10 00:43:20 2023
, name = ‘./bend-flux-refl-flux.h5’, tent_flags = 0
major: File accessibility
minor: Unable to open file
#002: …/…/…/src/H5FD.c line 741 in H5FD_open(): open failed
major: Virtual File Layer
minor: Unable to initialize object
#003: …/…/…/src/H5FDsec2.c line 360 in H5FD__sec2_open(): unable to open file: name = ‘./bend-flux-refl-flux.h5’, errno = 2, error message = ‘No such file or directory’, flags = 0, o_flags = 0
major: File accessibility
minor: Unable to open file
terminate called after throwing an instance of ‘std::runtime_error’
what(): meep: error on line 232 of h5file.cpp: error opening HDF5 input file
Aborted
Thanks for your help!
best