- #1
What code ? All I see is a text file with no code in it.khary23 said:Hello,
I am getting the following error
Unexpected error in file
I have gone through the code and noting seems to be amiss. Does anyone have any ideas?
Is there any information other than this, such as a line number where the error occurred?khary23 said:I am getting the following error
Unexpected error in file
phinds said:Here's what I see. I'm not aware of any computer language in which any of this would anything other than data.
Is this code in "MCNP" ?
Dose to water Ir-192 source
C Cell Cards
11 1 -22.42 -1 IMP:p,e=1 $ cylinder that defines source volume
12 3 -8.02 -3 2 5 IMP:p,e=1 $ volume that defines outer radius of casing
13 3 -8.02 -7 -2 1 IMP:p,e=1 $ volume that defines inner radious of casing
14 5 -0.99355 -4 -20 10 19 IMP:p,e=1 $ 2 19
16 3 -8.02 -2 -8 7 6 IMP:p,e=1 $ volume that defins end cap
17 4 -4.01 -10 -4 IMP:p,e=1 $ drive cable -4.81
C 20 2 -0.00125 -18 3 IMP:p,e=1
C 21 2 -0.00125 18 10 -19 IMP:p,e=1
C 22 2 -0.00125 -4 19 IMP:p,e=1
22 5 -0.99355 -20 3 10 -19 IMP:p,e=1 $ #11 #12 #13 #14 #16
23 5 -0.99355 20 -21 IMP:p,e=1 $ Tally Cell
24 5 -0.99355 21 -4 IMP:p,e=1
300 0 4 IMP:p,e=0 $ creates grave yard
C Surface Cards
1 RCC 0 0 -0.175 0 0 0.35 0.03 $ cylinder surface that defines source
2 RCC 0 0 -0.246 0 0 0.492 0.035 $ inner radius of casing
3 RCC 0 0 -0.246 0 0 0.492 0.045 $ outer radius of casing
4 SO 40 $ Graveyard
5 PZ -0.246 $ Bottom of source casing
6 RCC 0 0 0.35 0 0 0.072 0.03 $ end cap cylinder
7 PZ 0.175 $ plane that defines the top of the source
8 PZ 0.246 $ top of source casing
9 PZ -0.175 $ plane that defines the bottom of the source
10 RCC 0 0 -0.246 0 0 -40 0.043 $ drive cable
C 11 SO 10
19 SO 30
20 SO 0.9
21 SO 1.1
C 22 SO 325
C Data Cards
MODE p e $photon and electron transport
C tally card
*F4:p 23
# DE4 DF4 $ convert MeV/cm^2 to MeV/g
0.0010 4065
0.0015 1372
0.0020 615.2
0.0030 191.7
0.0040 81.91
0.0050 41.88
0.0060 24.05
0.0080 9.915
0.0100 4.944
0.0150 1.374
0.0200 0.5503
0.0300 0.1557
0.0400 0.06947
0.0500 0.04223
0.0600 0.03190
0.0800 0.02597
0.1000 0.02546
0.1500 0.02764
0.2000 0.02967
0.3000 0.03192
0.4000 0.03279
0.5000 0.03299
0.6000 0.03284
0.8000 0.03206
1.0000 0.03103
1.2500 0.02965
1.5000 0.02833
C Source is a cylindrical Isotropic Ir-192 photon emitting source centered at origin.
SDEF CEL 11 VEC 0 0 1 POS 0 0 -0.174 RAD D1 EXT D2 ERG D3 PAR 2
C Energy Spectrum of Ir-192 (MeV)
C Radius of circle centered on the axis of the cylinder
SI1 0.029
C Distance from the POS to the end of the cylinder
SI2 0.348
SI3 0 0.110093 0.13634348 0.17698 0.2013112 0.20579549
0.28004 0.2832668 0.29595827 0.30845692 0.31650791
0.329312 0.3744852 0.4164714 0.420532 0.46807152
0.4845780 0.48530 0.489039 0.5885845 0.59337
0.59935 0.60441464 0.61246564 0.70398 0.7658
0.8845418 1.06148 1.0897 1.3783
C Yield(%) Ir-192
SP3 0 0.000126 0.00183 0.000043 0.00472 0.033
0.00023 0.00262 0.2867 0.3 0.8281
0.000185 0.00721 0.00664 0.000737 0.4783
0.03184 0.000022 0.00443 0.04515 0.000426
0.000039 0.0823 0.05309 0.000053 0.0000149
0.002923 0.000528 0.0000108 0.0000124
C Define Materials
C Ir-192
M1 077192 1
C Air
C M2 6000 -0.00012 7000 -0.75527 8000 -0.23178 18000 -0.01283 GAS=1
C Stainless Steel
M3 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68
C M3 8000 -0.888 1000 -.112
M4 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68
C Water
M5 1000.04p 0.6667 8000.04p 0.3333
PRINT 50
NPS 10000000
Mark44 said:Is there any information other than this, such as a line number where the error occurred?
Which was already clear. My question is, is that stuff in the file CODE in "MCNP" ?khary23 said:The software is called MCNP
Yes that is the format of MCNP's code.phinds said:Which was already clear. My question is, is that stuff in the file CODE in "MCNP" ?
Dose to water Ir-192 source
C Cell Cards
11 1 -22.42 -1 IMP:p,e=1 $ cylinder that defines source volume
12 3 -8.02 -3 2 5 IMP:p,e=1 $ volume that defines outer radius of casing
13 3 -8.02 -7 -2 1 IMP:p,e=1 $ volume that defines inner radious of casing
14 5 -0.99355 -4 -20 10 19 IMP:p,e=1 $ 2 19
16 3 -8.02 -2 -8 7 6 IMP:p,e=1 $ volume that defins end cap
17 4 -4.01 -10 -4 IMP:p,e=1 $ drive cable -4.81
C 20 2 -0.00125 -18 3 IMP:p,e=1
C 21 2 -0.00125 18 10 -19 IMP:p,e=1
C 22 2 -0.00125 -4 19 IMP:p,e=1
22 5 -0.99355 -20 3 10 -19 IMP:p,e=1 $ #11 #12 #13 #14 #16
23 5 -0.99355 20 -21 IMP:p,e=1 $ Tally Cell
24 5 -0.99355 21 -4 IMP:p,e=1
300 0 4 IMP:p,e=0 $ creates grave yard
C Surface Cards
1 RCC 0 0 -0.175 0 0 0.35 0.03 $ cylinder surface that defines source
2 RCC 0 0 -0.246 0 0 0.492 0.035 $ inner radius of casing
3 RCC 0 0 -0.246 0 0 0.492 0.045 $ outer radius of casing
4 SO 40 $ Graveyard
5 PZ -0.246 $ Bottom of source casing
6 RCC 0 0 0.35 0 0 0.072 0.03 $ end cap cylinder
7 PZ 0.175 $ plane that defines the top of the source
8 PZ 0.246 $ top of source casing
9 PZ -0.175 $ plane that defines the bottom of the source
10 RCC 0 0 -0.246 0 0 -40 0.043 $ drive cable
C 11 SO 10
19 SO 30
20 SO 0.9
21 SO 1.1
C 22 SO 325
C Data Cards
MODE p e $photon and electron transport
C tally card
*F4:p 23
# DE4 DF4 $ convert MeV/cm^2 to MeV/g
0.0010 4065
0.0015 1372
0.0020 615.2
0.0030 191.7
0.0040 81.91
0.0050 41.88
0.0060 24.05
0.0080 9.915
0.0100 4.944
0.0150 1.374
0.0200 0.5503
0.0300 0.1557
0.0400 0.06947
0.0500 0.04223
0.0600 0.03190
0.0800 0.02597
0.1000 0.02546
0.1500 0.02764
0.2000 0.02967
0.3000 0.03192
0.4000 0.03279
0.5000 0.03299
0.6000 0.03284
0.8000 0.03206
1.0000 0.03103
1.2500 0.02965
1.5000 0.02833
C Source is a cylindrical Isotropic Ir-192 photon emitting source centered at origin.
SDEF CEL 11 VEC 0 0 1 POS 0 0 -0.174 RAD D1 EXT D2 ERG D3 PAR 2
C Energy Spectrum of Ir-192 (MeV)
C Radius of circle centered on the axis of the cylinder
SI1 0.029
C Distance from the POS to the end of the cylinder
SI2 0.348
SI3 0 0.110093 0.13634348 0.17698 0.2013112 0.20579549
0.28004 0.2832668 0.29595827 0.30845692 0.31650791
0.329312 0.3744852 0.4164714 0.420532 0.46807152
0.4845780 0.48530 0.489039 0.5885845 0.59337
0.59935 0.60441464 0.61246564 0.70398 0.7658
0.8845418 1.06148 1.0897 1.3783
C Yield(%) Ir-192
SP3 0 0.000126 0.00183 0.000043 0.00472 0.033
0.00023 0.00262 0.2867 0.3 0.8281
0.000185 0.00721 0.00664 0.000737 0.4783
0.03184 0.000022 0.00443 0.04515 0.000426
0.000039 0.0823 0.05309 0.000053 0.0000149
0.002923 0.000528 0.0000108 0.0000124
C Define Materials
C Ir-192
M1 077192 1
C Air
C M2 6000 -0.00012 7000 -0.75527 8000 -0.23178 18000 -0.01283 GAS=1
C Stainless Steel
M3 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68
C M3 8000 -0.888 1000 -.112
M4 025000 -0.02 014000 -0.01 024000 -0.17 028000 -0.12 026000 -0.68
C Water
M5 1000.04p 0.6667 8000.04p 0.3333
PRINT 50
NPS 10000000
Regarding that, my post included:DEvens said:The # operator that sysprog complained about introduces vertical format, a properly formed method of inputting data in MCNP.
The section of the manual on the complement operator includes:sysprog said:The description in the MCNP User's Guide leads me to be a bit suspicious regarding the use of the # (complement operator) on line 38, but I haven't seen enough samples or a complete enough description to justify my suspicion as other than unfounded.
I don't agree with your assessment that I "complained about" the # operator; I think that I merely suggested that its use might be among the things in the code that should be evaluated for the possibility of syntactic incorrectness.MCNP User's Guide said:#n means that the description of the current cell is the complement of the description of cell n. #(...) means complement the portion of the cell description in the parentheses (usually just a list of surfaces describing another cell).
Everyone who responded was clearly focused on being of assistance to @khary23 in getting the error corrected. I concede that given that, as I said:DEvens said:if you don't know MCNP it isn't helpful to complain
I was to some extent shooting in the dark; however, the procedure that I suggested I think reliably would find the part of the code that caused the error condition to be raised, and that would facilitate correction of the code.sysprog said:I don't know MCNP
Regarding X-Windows on Windows, CygWin/X is available at https://x.cygwin.com/DEvens said:As of MCNP 6.2 it looks like VisEd is no longer part of the package. You should be sure to set up the plotting utility, if you have not already done so. That might require you to get an x-windows emulator for MSWindows if you are using it.
There are several potential causes for this error, including incorrect input parameters, missing or corrupted data files, or a bug in the software. It is important to carefully check all input parameters and data files to ensure they are correct and complete.
One way to troubleshoot this error is to carefully review the error message and any accompanying error log files. These may provide clues as to what caused the error. Additionally, you can try running the simulation with different input parameters to see if the error persists.
While unexpected errors can occur in any software, there are steps that users can take to minimize the chances of encountering this error in MCNP. These include carefully reviewing input parameters and data files, regularly updating to the latest version of the software, and reporting any bugs or issues to the developers.
In some cases, it may be possible to recover from this error by restarting the simulation or adjusting input parameters. However, if the error persists, it may be necessary to seek assistance from the MCNP support team or consult the user manual for further guidance.
There is no one-size-fits-all solution for this error as it can have various causes. However, some common solutions include double-checking input parameters and data files, updating to the latest version of the software, and reporting any bugs or issues to the developers. It may also be helpful to consult online forums or seek assistance from other MCNP users.