Dear experts,
The attachment is my file. The model relate to optical photon’s wavelength convert, so I use wvlnsh.f, but it seems that the user routine did not work from the result of USRBDX. Could you help me to find the reason?
Look forward to your help.
detector(ZnO).inp (3.3 KB)
abscff.f (1.4 KB)
wvlnsh.f (2.7 KB)
surH.f (2.7 KB)
Dear Xiong,
there are multiple issues with you user routine:
-
The
MMAT
(material number) is an integer, it can’t be3.5
-
The variable containing the wavelength is
WVLNGT
and notWVLNGH
-
It is not possible to compare to floating point number using equal. you should use:
abs(A - B) < e
where
e
is the maximum allowed difference betweenA
andB
.
Cheers,
David