-
Notifications
You must be signed in to change notification settings - Fork 5
/
initialiseFluxSource.H
53 lines (43 loc) · 1.27 KB
/
initialiseFluxSource.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
List<List<List<List<scalar> > > > aflux(energyGroups);
List<List<List<List<scalar> > > > oldAflux(energyGroups);
Info<<"Initialising fluxes and sources"<<endl;
if(anisotropy>0)
{
//Initialise zeroth flux moment for calculating initial scattering source
forAll(flux, energyI)
{
fluxMo[energyI][0][0]=flux[energyI]*Foam::sqrt(one_over_4_PI);
}
#include "calcAnisotropicSource.H"
}
forAll(flux, energyI)
{
if(anisotropy==0)
{
#include "calcScatteringSource.H"
#include "calcFissionSource.H"
Q.set(energyI,(scatteringSource[energyI] + fissionSource[energyI]/keff));
oldQ.set(energyI, Q[energyI]);
}
prevFlux.set(energyI, flux[energyI]);
oldFlux.set(energyI, flux[energyI]);
aflux[energyI]=List<List<List<scalar> > >(npo);
oldAflux[energyI]=List<List<List<scalar> > >(npo);
forAll(aflux[energyI], j)
{
aflux[energyI][j]=List<List<scalar> >(totalRays);
oldAflux[energyI][j]=List<List<scalar> >(totalRays);
forAll(aflux[energyI][j], lines)
{
aflux[energyI][j][lines]=List<scalar>(2);
oldAflux[energyI][j][lines]=List<scalar>(2);
forAll(aflux[energyI][j][lines], d)
{
aflux[energyI][j][lines][d]=1.0;
oldAflux[energyI][j][lines][d]=1.0;
}
}
}
}
#include "calcTotalFission.H"
prevFissions=gSum(totalFissions.internalField() * area);