Question: Help to compile FORTAN code for an Homeogenous slab shielding problem. The code is listed below which will not compile. - - - - -
Help to compile FORTAN code for an Homeogenous slab shielding problem. The code is listed below which will not compile.
The number of trials run.
The thickness of the slab.
The value of the total macroscopic cross section.
The value of the macroscopic absorption cross section.
The fraction of particles that were absorbed in the slab.
The fraction of particles that penetrated the slab.
The fraction of particles that backscattered out of the slab.
The sum of the three fractions, that is items and
program infiniteslab
Provides the file IO shell for the Monte Carlo infinite slab project
Formatfree read of data for 'ncase' cases from fort
Writes formatted output to fort
Compilation command
gfortran o infslab.exe infiniteslab.fstatic ranseed.f
implicit none
ncase number of cases to run user input
ntrial number of particles trials
sigt total macro xseccm
siga absorption macro xec, cm
thick shield thickness, cm
tprob sum of the output probabilities
fabs fraction absorbed
fback fraction backscattered
fpen fraction penetrated
integer :: ncase, n ntrial
real :: sigt, siga, thick, tprob, fabs, fback, fpen
Store run title enclosed by single quotes
Should include student name
real :: r random number between and
integer :: d i x
real :: theta
real, parameter :: pi
characterlen :: title
add additional declaration statements here
V
call ranseed
read input file fort
read title store run title
read ncase read number of cases
read Skip file description
inititalize outputs
tprob ; fabs ; fback ; fpen
write output to fort
write title
write write header line
run 'ncase' cases each of 'ntrial' trials
outer: do n ncase
read next line of data from the input file
read ntrial, thick, sigt, siga
middle:do i ntrail
insert infinite slab algorithm here
V
call randomnumber r
d log r sigt
x x d
call randomnumber r
theta pir
x x dcostheta
call randomnumber r
if r E r E then ensure r not zero
d logr sigt
if x thick then
fpen fpen
cycle middle
call randomnumber r
if r siga sigt then
fabs fabs
cycle middle
inner: do
call randomnumber r
d log r sigt
x x d
call randomnumber r
theta pir
x x dcostheta
call randomnumber r
if r E r E then ensure r not zero
d logr sigt
if x thick then
fpen fpen
cycle middle
if x then
fback fback
cycle middle
end if
call randomnumber r
if r sigasigt then
fabs fabs
cycle middle
end do middle
end do outer
write output for present case to fort
write n ntrial, thick, sigt, siga, fabs, fpen, fback, tprob
r logE
FORMAT statements describe the manner in which data is to be written to file
format Case # Trials Slab cm Sigt Siga Pabs Ppen &
'Pback Totalprob'
formatIXIXFXFF
end program infiniteslab
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
