Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a781560161 | |||
| 53ee760eb4 | |||
| 5428f1ccc7 |
@@ -0,0 +1,602 @@
|
||||
# Dataset "D2O" exported from GenX on Wed Dec 12 04:56:52 2018
|
||||
# Column lables:
|
||||
# q R
|
||||
1.666666666666666774e-03 1.000000000000000444e+00
|
||||
3.333333333333333547e-03 9.999999999999997780e-01
|
||||
5.000000000000000104e-03 9.999999999999997780e-01
|
||||
6.666666666666667095e-03 1.000000000000000000e+00
|
||||
8.333333333333333218e-03 1.000000000000000000e+00
|
||||
1.000000000000000021e-02 9.999999999999997780e-01
|
||||
1.166666666666666546e-02 1.000000000000000000e+00
|
||||
1.333333333333333419e-02 1.000000000000000000e+00
|
||||
1.499999999999999944e-02 1.000000000000000000e+00
|
||||
1.666666666666666644e-02 9.999999999999997780e-01
|
||||
1.833333333333333343e-02 4.278890099662767121e-01
|
||||
2.000000000000000042e-02 1.488213407917928499e-01
|
||||
2.166666666666666741e-02 7.884172397716723846e-02
|
||||
2.333333333333333440e-02 4.817452607189460362e-02
|
||||
2.500000000000000486e-02 3.189361318639775261e-02
|
||||
2.666666666666666838e-02 2.227351089491558592e-02
|
||||
2.833333333333333537e-02 1.617286323369671042e-02
|
||||
3.000000000000000236e-02 1.210130221930963597e-02
|
||||
3.166666666666666935e-02 9.275545669075232341e-03
|
||||
3.333333333333333287e-02 7.252320052814169304e-03
|
||||
3.500000000000000333e-02 5.766184773509967602e-03
|
||||
3.666666666666666685e-02 4.650893428800271893e-03
|
||||
3.833333333333333731e-02 3.798435003476626718e-03
|
||||
4.000000000000000083e-02 3.136449158010019053e-03
|
||||
4.166666666666666435e-02 2.615177649439983341e-03
|
||||
4.333333333333333481e-02 2.199624859348910891e-03
|
||||
4.500000000000000527e-02 1.864688519115220407e-03
|
||||
4.666666666666666879e-02 1.592047104649371280e-03
|
||||
4.833333333333333925e-02 1.368119547985798337e-03
|
||||
4.999999999999999584e-02 1.182697864477368077e-03
|
||||
5.166666666666666630e-02 1.028012492027462850e-03
|
||||
5.333333333333333676e-02 8.980819969847711167e-04
|
||||
5.500000000000000028e-02 7.882533389725678323e-04
|
||||
5.666666666666667074e-02 6.948721016997541113e-04
|
||||
5.833333333333334120e-02 6.150427933261069530e-04
|
||||
6.000000000000000472e-02 5.464524855421789510e-04
|
||||
6.166666666666666824e-02 4.872395943257391100e-04
|
||||
6.333333333333333870e-02 4.358952326153466895e-04
|
||||
6.500000000000000222e-02 3.911883347291949869e-04
|
||||
6.666666666666666574e-02 3.521083144256650943e-04
|
||||
6.833333333333334314e-02 3.178207833803634160e-04
|
||||
7.000000000000000666e-02 2.876330878189759703e-04
|
||||
7.166666666666667018e-02 2.609672896223826869e-04
|
||||
7.333333333333333370e-02 2.373388377584093804e-04
|
||||
7.499999999999999722e-02 2.163396222927348015e-04
|
||||
7.666666666666667462e-02 1.976244279443217474e-04
|
||||
7.833333333333333814e-02 1.809000424665311657e-04
|
||||
8.000000000000000167e-02 1.659164515183386701e-04
|
||||
8.166666666666666519e-02 1.524596832757783220e-04
|
||||
8.333333333333332871e-02 1.403459649391344810e-04
|
||||
8.500000000000000611e-02 1.294169281633042532e-04
|
||||
8.666666666666666963e-02 1.195356575005832348e-04
|
||||
8.833333333333333315e-02 1.105834197134533182e-04
|
||||
9.000000000000001055e-02 1.024569455916587762e-04
|
||||
9.166666666666667407e-02 9.506616212616428763e-05
|
||||
9.333333333333333759e-02 8.833229335679883471e-05
|
||||
9.500000000000001499e-02 8.218626426822687851e-05
|
||||
9.666666666666667851e-02 7.656735477319774488e-05
|
||||
9.833333333333332815e-02 7.142206085828434919e-05
|
||||
9.999999999999999167e-02 6.670312795820712841e-05
|
||||
1.016666666666666691e-01 6.236872801538500633e-05
|
||||
1.033333333333333326e-01 5.838175681406183431e-05
|
||||
1.049999999999999961e-01 5.470923231784354554e-05
|
||||
1.066666666666666735e-01 5.132177809103187119e-05
|
||||
1.083333333333333370e-01 4.819317860823825678e-05
|
||||
1.100000000000000006e-01 4.529999547886719982e-05
|
||||
1.116666666666666780e-01 4.262123543222435878e-05
|
||||
1.133333333333333415e-01 4.013806240326980157e-05
|
||||
1.150000000000000050e-01 3.783354729055566355e-05
|
||||
1.166666666666666824e-01 3.569244997606189424e-05
|
||||
1.183333333333333459e-01 3.370102904102350720e-05
|
||||
1.199999999999999956e-01 3.184687531417531464e-05
|
||||
1.216666666666666591e-01 3.011876597473503737e-05
|
||||
1.233333333333333365e-01 2.850653642251948946e-05
|
||||
1.250000000000000000e-01 2.700096753867208433e-05
|
||||
1.266666666666666774e-01 2.559368630616589346e-05
|
||||
1.283333333333333270e-01 2.427707805072443407e-05
|
||||
1.300000000000000044e-01 2.304420880910700020e-05
|
||||
1.316666666666666818e-01 2.188875654044092456e-05
|
||||
1.333333333333333315e-01 2.080495007345798850e-05
|
||||
1.350000000000000089e-01 1.978751483337357349e-05
|
||||
1.366666666666666863e-01 1.883162452074562727e-05
|
||||
1.383333333333333359e-01 1.793285802466960840e-05
|
||||
1.400000000000000133e-01 1.708716094682676266e-05
|
||||
1.416666666666666630e-01 1.629081119377076716e-05
|
||||
1.433333333333333404e-01 1.554038816436415657e-05
|
||||
1.449999999999999900e-01 1.483274511916031133e-05
|
||||
1.466666666666666674e-01 1.416498437028349574e-05
|
||||
1.483333333333333448e-01 1.353443497503935812e-05
|
||||
1.499999999999999944e-01 1.293863265526270861e-05
|
||||
1.516666666666666718e-01 1.237530169802975281e-05
|
||||
1.533333333333333492e-01 1.184233862257320649e-05
|
||||
1.549999999999999989e-01 1.133779742373565549e-05
|
||||
1.566666666666666763e-01 1.085987622444452896e-05
|
||||
1.583333333333333537e-01 1.040690518911860359e-05
|
||||
1.600000000000000033e-01 9.977335566874202179e-06
|
||||
1.616666666666666530e-01 9.569729748255288910e-06
|
||||
1.633333333333333304e-01 9.182752232256569594e-06
|
||||
1.650000000000000078e-01 8.815161411882592866e-06
|
||||
1.666666666666666574e-01 8.465802096553117905e-06
|
||||
1.683333333333333348e-01 8.133598698563745824e-06
|
||||
1.700000000000000122e-01 7.817549018652005991e-06
|
||||
1.716666666666666619e-01 7.516718572640144719e-06
|
||||
1.733333333333333393e-01 7.230235407255999659e-06
|
||||
1.750000000000000167e-01 6.957285358675551028e-06
|
||||
1.766666666666666663e-01 6.697107712119624589e-06
|
||||
1.783333333333333437e-01 6.448991225139495569e-06
|
||||
1.800000000000000211e-01 6.212270481001756507e-06
|
||||
1.816666666666666707e-01 5.986322541985373861e-06
|
||||
1.833333333333333481e-01 5.770563875403461062e-06
|
||||
1.850000000000000255e-01 5.564447527857933166e-06
|
||||
1.866666666666666752e-01 5.367460525630802926e-06
|
||||
1.883333333333333526e-01 5.179121481263889293e-06
|
||||
1.900000000000000300e-01 4.998978388304243934e-06
|
||||
1.916666666666666796e-01 4.826606587902449178e-06
|
||||
1.933333333333333570e-01 4.661606892498666493e-06
|
||||
1.949999999999999789e-01 4.503603853220810334e-06
|
||||
1.966666666666666563e-01 4.352244158853627849e-06
|
||||
1.983333333333333337e-01 4.207195155366130449e-06
|
||||
1.999999999999999833e-01 4.068143475980169914e-06
|
||||
2.016666666666666607e-01 3.934793772686430275e-06
|
||||
2.033333333333333381e-01 3.806867540912906612e-06
|
||||
2.049999999999999878e-01 3.684102029812693030e-06
|
||||
2.066666666666666652e-01 3.566249231277894375e-06
|
||||
2.083333333333333426e-01 3.453074941419783672e-06
|
||||
2.099999999999999922e-01 3.344357888775087484e-06
|
||||
2.116666666666666696e-01 3.239888924009728753e-06
|
||||
2.133333333333333470e-01 3.139470266334596331e-06
|
||||
2.149999999999999967e-01 3.042914802251790103e-06
|
||||
2.166666666666666741e-01 2.950045432621829097e-06
|
||||
2.183333333333333515e-01 2.860694464382629580e-06
|
||||
2.200000000000000011e-01 2.774703043543939583e-06
|
||||
2.216666666666666785e-01 2.691920626371921660e-06
|
||||
2.233333333333333559e-01 2.612204485923215747e-06
|
||||
2.250000000000000056e-01 2.535419251321134289e-06
|
||||
2.266666666666666829e-01 2.461436477374981832e-06
|
||||
2.283333333333333603e-01 2.390134242339578590e-06
|
||||
2.300000000000000100e-01 2.321396771782409159e-06
|
||||
2.316666666666666874e-01 2.255114086686947400e-06
|
||||
2.333333333333333648e-01 2.191181674072064817e-06
|
||||
2.350000000000000144e-01 2.129500178532259954e-06
|
||||
2.366666666666666641e-01 2.069975113235872753e-06
|
||||
2.383333333333333137e-01 2.012516589024861832e-06
|
||||
2.399999999999999911e-01 1.957039060362928086e-06
|
||||
2.416666666666666685e-01 1.903461086978215846e-06
|
||||
2.433333333333333182e-01 1.851705110125668454e-06
|
||||
2.449999999999999956e-01 1.801697242484656788e-06
|
||||
2.466666666666666730e-01 1.753367070768793780e-06
|
||||
2.483333333333333226e-01 1.706647470202641125e-06
|
||||
2.500000000000000000e-01 1.661474430073583966e-06
|
||||
2.516666666666666496e-01 1.617786889634525484e-06
|
||||
2.533333333333333548e-01 1.575526583672322839e-06
|
||||
2.550000000000000044e-01 1.534637897117887747e-06
|
||||
2.566666666666666541e-01 1.495067728112825765e-06
|
||||
2.583333333333333592e-01 1.456765358986138293e-06
|
||||
2.600000000000000089e-01 1.419682334641076900e-06
|
||||
2.616666666666666585e-01 1.383772347877744191e-06
|
||||
2.633333333333333637e-01 1.348991131217263989e-06
|
||||
2.650000000000000133e-01 1.315296354818597880e-06
|
||||
2.666666666666666630e-01 1.282647530111641326e-06
|
||||
2.683333333333333681e-01 1.251005918788133922e-06
|
||||
2.700000000000000178e-01 1.220334446827233344e-06
|
||||
2.716666666666666674e-01 1.190597623243038357e-06
|
||||
2.733333333333333726e-01 1.161761463270364772e-06
|
||||
2.750000000000000222e-01 1.133793415721052668e-06
|
||||
2.766666666666666718e-01 1.106662294257604684e-06
|
||||
2.783333333333333770e-01 1.080338212354247784e-06
|
||||
2.799999999999999711e-01 1.054792521725799368e-06
|
||||
2.816666666666666763e-01 1.029997754018219457e-06
|
||||
2.833333333333333259e-01 1.005927565572790483e-06
|
||||
2.849999999999999756e-01 9.825566850820815396e-07
|
||||
2.866666666666666807e-01 9.598608639732615301e-07
|
||||
2.883333333333333304e-01 9.378168293585886465e-07
|
||||
2.899999999999999800e-01 9.164022394086225599e-07
|
||||
2.916666666666666852e-01 8.955956410101256596e-07
|
||||
2.933333333333333348e-01 8.753764295778831038e-07
|
||||
2.949999999999999845e-01 8.557248109005632261e-07
|
||||
2.966666666666666896e-01 8.366217649064254447e-07
|
||||
2.983333333333333393e-01 8.180490112424303144e-07
|
||||
2.999999999999999889e-01 7.999889765662185461e-07
|
||||
3.016666666666666941e-01 7.824247634566031229e-07
|
||||
3.033333333333333437e-01 7.653401208536856050e-07
|
||||
3.049999999999999933e-01 7.487194159467357586e-07
|
||||
3.066666666666666985e-01 7.325476074302012377e-07
|
||||
3.083333333333333481e-01 7.168102200542004489e-07
|
||||
3.099999999999999978e-01 7.014933204016261675e-07
|
||||
3.116666666666667029e-01 6.865834938247368856e-07
|
||||
3.133333333333333526e-01 6.720678224807055402e-07
|
||||
3.150000000000000022e-01 6.579338644088638659e-07
|
||||
3.166666666666667074e-01 6.441696335933557605e-07
|
||||
3.183333333333333570e-01 6.307635809619567706e-07
|
||||
3.200000000000000067e-01 6.177045762704861100e-07
|
||||
3.216666666666666563e-01 6.049818908285881516e-07
|
||||
3.233333333333333059e-01 5.925851810228969717e-07
|
||||
3.250000000000000111e-01 5.805044725975379231e-07
|
||||
3.266666666666666607e-01 5.687301456524136093e-07
|
||||
3.283333333333333104e-01 5.572529203243753383e-07
|
||||
3.300000000000000155e-01 5.460638431155777233e-07
|
||||
3.316666666666666652e-01 5.351542738380492230e-07
|
||||
3.333333333333333148e-01 5.245158731424355772e-07
|
||||
3.349999999999999645e-01 5.141405906029524026e-07
|
||||
3.366666666666666696e-01 5.040206533302537216e-07
|
||||
3.383333333333333193e-01 4.941485550876948170e-07
|
||||
3.400000000000000244e-01 4.845170458847093710e-07
|
||||
3.416666666666666186e-01 4.751191220255591928e-07
|
||||
3.433333333333332682e-01 4.659480165906534015e-07
|
||||
3.449999999999999734e-01 4.569971903295460034e-07
|
||||
3.466666666666666230e-01 4.482603229469790451e-07
|
||||
3.483333333333333282e-01 4.397313047614977070e-07
|
||||
3.499999999999999223e-01 4.314042287208653742e-07
|
||||
3.516666666666666274e-01 4.232733827558140539e-07
|
||||
3.533333333333332771e-01 4.153332424573397253e-07
|
||||
3.549999999999999822e-01 4.075784640615351313e-07
|
||||
3.566666666666666319e-01 4.000038777292889257e-07
|
||||
3.583333333333333370e-01 3.926044811040436616e-07
|
||||
3.599999999999999312e-01 3.853754331392276300e-07
|
||||
3.616666666666666363e-01 3.783120481782318474e-07
|
||||
3.633333333333332860e-01 3.714097902796220345e-07
|
||||
3.649999999999999911e-01 3.646642677731980957e-07
|
||||
3.666666666666666408e-01 3.580712280380514568e-07
|
||||
3.683333333333333459e-01 3.516265524931203130e-07
|
||||
3.699999999999999400e-01 3.453262517889697274e-07
|
||||
3.716666666666666452e-01 3.391664611933971690e-07
|
||||
3.733333333333332948e-01 3.331434361608929561e-07
|
||||
3.750000000000000000e-01 3.272535480795934377e-07
|
||||
3.766666666666666496e-01 3.214932801861428377e-07
|
||||
3.783333333333333548e-01 3.158592236417421358e-07
|
||||
3.799999999999999489e-01 3.103480737630341399e-07
|
||||
3.816666666666666541e-01 3.049566263996402449e-07
|
||||
3.833333333333333037e-01 2.996817744538079836e-07
|
||||
3.850000000000000089e-01 2.945205045339781409e-07
|
||||
3.866666666666666585e-01 2.894698937386802210e-07
|
||||
3.883333333333332527e-01 2.845271065633872936e-07
|
||||
3.899999999999999578e-01 2.796893919258994434e-07
|
||||
3.916666666666666075e-01 2.749540803056783491e-07
|
||||
3.933333333333333126e-01 2.703185809912008519e-07
|
||||
3.949999999999999623e-01 2.657803794317688377e-07
|
||||
3.966666666666666674e-01 2.613370346887342655e-07
|
||||
3.983333333333332615e-01 2.569861769826488238e-07
|
||||
3.999999999999999667e-01 2.527255053318415819e-07
|
||||
4.016666666666666163e-01 2.485527852785805369e-07
|
||||
4.033333333333333215e-01 2.444658466998234756e-07
|
||||
4.049999999999999711e-01 2.404625816985930862e-07
|
||||
4.066666666666666763e-01 2.365409425726759068e-07
|
||||
4.083333333333332704e-01 2.326989398574939118e-07
|
||||
4.099999999999999756e-01 2.289346404410401519e-07
|
||||
4.116666666666666252e-01 2.252461657459381559e-07
|
||||
4.133333333333333304e-01 2.216316899786217051e-07
|
||||
4.149999999999999800e-01 2.180894384403688449e-07
|
||||
4.166666666666666852e-01 2.146176858994822517e-07
|
||||
4.183333333333332793e-01 2.112147550215341852e-07
|
||||
4.199999999999999845e-01 2.078790148552956769e-07
|
||||
4.216666666666666341e-01 2.046088793723830935e-07
|
||||
4.233333333333333393e-01 2.014028060586591008e-07
|
||||
4.249999999999999889e-01 1.982592945545198166e-07
|
||||
4.266666666666666941e-01 1.951768853434860026e-07
|
||||
4.283333333333332882e-01 1.921541584862062874e-07
|
||||
4.299999999999999378e-01 1.891897323983826992e-07
|
||||
4.316666666666666430e-01 1.862822626711279980e-07
|
||||
4.333333333333332926e-01 1.834304409319838172e-07
|
||||
4.349999999999999978e-01 1.806329937448558671e-07
|
||||
4.366666666666665919e-01 1.778886815480091343e-07
|
||||
4.383333333333332971e-01 1.751962976278381794e-07
|
||||
4.399999999999999467e-01 1.725546671275221688e-07
|
||||
4.416666666666666519e-01 1.699626460896338315e-07
|
||||
4.433333333333333015e-01 1.674191205304111419e-07
|
||||
4.450000000000000067e-01 1.649230055455147006e-07
|
||||
4.466666666666666008e-01 1.624732444456537195e-07
|
||||
4.483333333333333059e-01 1.600688079208929665e-07
|
||||
4.499999999999999556e-01 1.577086932327046181e-07
|
||||
4.516666666666666607e-01 1.553919234328560753e-07
|
||||
4.533333333333333104e-01 1.531175466080692588e-07
|
||||
4.550000000000000155e-01 1.508846351492376930e-07
|
||||
4.566666666666666097e-01 1.486922850448507061e-07
|
||||
4.583333333333333148e-01 1.465396151971450857e-07
|
||||
4.599999999999999645e-01 1.444257667609723853e-07
|
||||
4.616666666666666696e-01 1.423499025033281690e-07
|
||||
4.633333333333333193e-01 1.403112061841498309e-07
|
||||
4.650000000000000244e-01 1.383088819569432176e-07
|
||||
4.666666666666666186e-01 1.363421537881076345e-07
|
||||
4.683333333333333237e-01 1.344102648954561287e-07
|
||||
4.699999999999999734e-01 1.325124772039488831e-07
|
||||
4.716666666666666230e-01 1.306480708193427343e-07
|
||||
4.733333333333333282e-01 1.288163435178928122e-07
|
||||
4.749999999999999223e-01 1.270166102522842302e-07
|
||||
4.766666666666666274e-01 1.252482026731469324e-07
|
||||
4.783333333333332771e-01 1.235104686655383796e-07
|
||||
4.799999999999999822e-01 1.218027718995583457e-07
|
||||
4.816666666666666319e-01 1.201244913953094081e-07
|
||||
4.833333333333333370e-01 1.184750211009893069e-07
|
||||
4.849999999999999312e-01 1.168537694842340232e-07
|
||||
4.866666666666666363e-01 1.152601591357136128e-07
|
||||
4.883333333333332860e-01 1.136936263851973570e-07
|
||||
4.899999999999999911e-01 1.121536209290883352e-07
|
||||
4.916666666666666408e-01 1.106396054692444604e-07
|
||||
4.933333333333333459e-01 1.091510553630105115e-07
|
||||
4.949999999999999400e-01 1.076874582836395939e-07
|
||||
4.966666666666666452e-01 1.062483138907317179e-07
|
||||
4.983333333333332948e-01 1.048331335110549754e-07
|
||||
5.000000000000000000e-01 1.034414398283543063e-07
|
||||
5.016666666666665941e-01 1.020727665829383066e-07
|
||||
5.033333333333332993e-01 1.007266582795142976e-07
|
||||
5.050000000000000044e-01 9.940266990459173164e-08
|
||||
5.066666666666667096e-01 9.810036665122127283e-08
|
||||
5.083333333333333037e-01 9.681932365250397800e-08
|
||||
5.100000000000000089e-01 9.555912572272193437e-08
|
||||
5.116666666666666030e-01 9.431936710605483167e-08
|
||||
5.133333333333333082e-01 9.309965123230888181e-08
|
||||
5.150000000000000133e-01 9.189959048042863459e-08
|
||||
5.166666666666666075e-01 9.071880594796567180e-08
|
||||
5.183333333333333126e-01 8.955692722788657699e-08
|
||||
5.199999999999999067e-01 8.841359219170529006e-08
|
||||
5.216666666666666119e-01 8.728844677830060142e-08
|
||||
5.233333333333333171e-01 8.618114478944762623e-08
|
||||
5.250000000000000222e-01 8.509134769065551672e-08
|
||||
5.266666666666666163e-01 8.401872441814319854e-08
|
||||
5.283333333333333215e-01 8.296295119065706527e-08
|
||||
5.299999999999999156e-01 8.192371132726176387e-08
|
||||
5.316666666666666208e-01 8.090069506964976861e-08
|
||||
5.333333333333333259e-01 7.989359940991245132e-08
|
||||
5.350000000000000311e-01 7.890212792294620869e-08
|
||||
5.366666666666666252e-01 7.792599060318702045e-08
|
||||
5.383333333333333304e-01 7.696490370652527585e-08
|
||||
5.399999999999999245e-01 7.601858959631580589e-08
|
||||
5.416666666666666297e-01 7.508677659314320962e-08
|
||||
5.433333333333333348e-01 7.416919882963958646e-08
|
||||
5.450000000000000400e-01 7.326559610846012639e-08
|
||||
5.466666666666666341e-01 7.237571376482805913e-08
|
||||
5.483333333333333393e-01 7.149930253213303793e-08
|
||||
5.499999999999999334e-01 7.063611841175256497e-08
|
||||
5.516666666666666385e-01 6.978592254615237399e-08
|
||||
5.533333333333333437e-01 6.894848109549501148e-08
|
||||
5.550000000000000488e-01 6.812356511723137695e-08
|
||||
5.566666666666666430e-01 6.731095044973926732e-08
|
||||
5.583333333333332371e-01 6.651041759806650711e-08
|
||||
5.599999999999999423e-01 6.572175162342982274e-08
|
||||
5.616666666666666474e-01 6.494474203552961160e-08
|
||||
5.633333333333333526e-01 6.417918268740402335e-08
|
||||
5.649999999999999467e-01 6.342487167345138111e-08
|
||||
5.666666666666666519e-01 6.268161122997877260e-08
|
||||
5.683333333333332460e-01 6.194920763820793676e-08
|
||||
5.699999999999999512e-01 6.122747113030067724e-08
|
||||
5.716666666666666563e-01 6.051621579725066012e-08
|
||||
5.733333333333333615e-01 5.981525949950748832e-08
|
||||
5.749999999999999556e-01 5.912442377991602164e-08
|
||||
5.766666666666666607e-01 5.844353377899839119e-08
|
||||
5.783333333333332549e-01 5.777241815195687396e-08
|
||||
5.799999999999999600e-01 5.711090898859819714e-08
|
||||
5.816666666666666652e-01 5.645884173448569610e-08
|
||||
5.833333333333333703e-01 5.581605511470497935e-08
|
||||
5.849999999999999645e-01 5.518239105925946357e-08
|
||||
5.866666666666666696e-01 5.455769463067958281e-08
|
||||
5.883333333333332638e-01 5.394181395298541755e-08
|
||||
5.899999999999999689e-01 5.333460014302300771e-08
|
||||
5.916666666666666741e-01 5.273590724301440439e-08
|
||||
5.933333333333333792e-01 5.214559215520071354e-08
|
||||
5.949999999999999734e-01 5.156351457791591065e-08
|
||||
5.966666666666666785e-01 5.098953694326822462e-08
|
||||
5.983333333333332726e-01 5.042352435646910014e-08
|
||||
5.999999999999999778e-01 4.986534453667874591e-08
|
||||
6.016666666666666829e-01 4.931486775920430857e-08
|
||||
6.033333333333332771e-01 4.877196679922090596e-08
|
||||
6.049999999999999822e-01 4.823651687681002158e-08
|
||||
6.066666666666665764e-01 4.770839560356234247e-08
|
||||
6.083333333333332815e-01 4.718748293010142776e-08
|
||||
6.099999999999999867e-01 4.667366109538092527e-08
|
||||
6.116666666666666918e-01 4.616681457675680997e-08
|
||||
6.133333333333332860e-01 4.566683004160191730e-08
|
||||
6.149999999999999911e-01 4.517359629995142803e-08
|
||||
6.166666666666665853e-01 4.468700425834689817e-08
|
||||
6.183333333333332904e-01 4.420694687473174789e-08
|
||||
6.199999999999999956e-01 4.373331911448575834e-08
|
||||
6.216666666666667007e-01 4.326601790764034557e-08
|
||||
6.233333333333332948e-01 4.280494210676177292e-08
|
||||
6.250000000000000000e-01 4.234999244626248742e-08
|
||||
6.266666666666665941e-01 4.190107150236622004e-08
|
||||
6.283333333333332993e-01 4.145808365429422949e-08
|
||||
6.300000000000000044e-01 4.102093504606244872e-08
|
||||
6.316666666666667096e-01 4.058953354952004420e-08
|
||||
6.333333333333333037e-01 4.016378872788478652e-08
|
||||
6.350000000000000089e-01 3.974361180054057285e-08
|
||||
6.366666666666666030e-01 3.932891560836080469e-08
|
||||
6.383333333333333082e-01 3.891961458003366657e-08
|
||||
6.400000000000000133e-01 3.851562469891549018e-08
|
||||
6.416666666666666075e-01 3.811686347104804092e-08
|
||||
6.433333333333333126e-01 3.772324989352787249e-08
|
||||
6.449999999999999067e-01 3.733470442382901695e-08
|
||||
6.466666666666666119e-01 3.695114894991631394e-08
|
||||
6.483333333333333171e-01 3.657250676073420709e-08
|
||||
6.500000000000000222e-01 3.619870251755798537e-08
|
||||
6.516666666666666163e-01 3.582966222627760775e-08
|
||||
6.533333333333333215e-01 3.546531320962220248e-08
|
||||
6.549999999999999156e-01 3.510558408087192307e-08
|
||||
6.566666666666666208e-01 3.475040471735568370e-08
|
||||
6.583333333333333259e-01 3.439970623520317829e-08
|
||||
6.600000000000000311e-01 3.405342096424553406e-08
|
||||
6.616666666666666252e-01 3.371148242375067629e-08
|
||||
6.633333333333333304e-01 3.337382529844583069e-08
|
||||
6.649999999999999245e-01 3.304038541531268527e-08
|
||||
6.666666666666666297e-01 3.271109972085879636e-08
|
||||
6.683333333333333348e-01 3.238590625873510041e-08
|
||||
6.699999999999999289e-01 3.206474414802221109e-08
|
||||
6.716666666666667451e-01 3.174755356198754107e-08
|
||||
6.733333333333333393e-01 3.143427570727327899e-08
|
||||
6.749999999999999334e-01 3.112485280338944387e-08
|
||||
6.766666666666666385e-01 3.081922806305666575e-08
|
||||
6.783333333333333437e-01 3.051734567259488484e-08
|
||||
6.800000000000000488e-01 3.021915077290711772e-08
|
||||
6.816666666666666430e-01 2.992458944089847277e-08
|
||||
6.833333333333332371e-01 2.963360867123555706e-08
|
||||
6.849999999999999423e-01 2.934615635857900073e-08
|
||||
6.866666666666666474e-01 2.906218128011027574e-08
|
||||
6.883333333333333526e-01 2.878163307851241170e-08
|
||||
6.899999999999999467e-01 2.850446224533779264e-08
|
||||
6.916666666666665408e-01 2.823062010459122576e-08
|
||||
6.933333333333333570e-01 2.796005879684877517e-08
|
||||
6.949999999999999512e-01 2.769273126365537854e-08
|
||||
6.966666666666666563e-01 2.742859123214359243e-08
|
||||
6.983333333333332504e-01 2.716759320021219980e-08
|
||||
7.000000000000000666e-01 2.690969242177687162e-08
|
||||
7.016666666666666607e-01 2.665484489248551212e-08
|
||||
7.033333333333332549e-01 2.640300733572920854e-08
|
||||
7.049999999999999600e-01 2.615413718884067298e-08
|
||||
7.066666666666666652e-01 2.590819258975669951e-08
|
||||
7.083333333333333703e-01 2.566513236382797849e-08
|
||||
7.099999999999999645e-01 2.542491601092621619e-08
|
||||
7.116666666666665586e-01 2.518750369291540244e-08
|
||||
7.133333333333333748e-01 2.495285622115671481e-08
|
||||
7.149999999999999689e-01 2.472093504466301426e-08
|
||||
7.166666666666666741e-01 2.449170223802871503e-08
|
||||
7.183333333333332682e-01 2.426512049009232800e-08
|
||||
7.200000000000000844e-01 2.404115309236922660e-08
|
||||
7.216666666666666785e-01 2.381976392810350769e-08
|
||||
7.233333333333332726e-01 2.360091746134887006e-08
|
||||
7.249999999999999778e-01 2.338457872624707644e-08
|
||||
7.266666666666666829e-01 2.317071331677937767e-08
|
||||
7.283333333333333881e-01 2.295928737625747089e-08
|
||||
7.299999999999999822e-01 2.275026758767343839e-08
|
||||
7.316666666666665764e-01 2.254362116355122094e-08
|
||||
7.333333333333332815e-01 2.233931583664113037e-08
|
||||
7.349999999999999867e-01 2.213731985027616766e-08
|
||||
7.366666666666666918e-01 2.193760194928167534e-08
|
||||
7.383333333333332860e-01 2.174013137095134288e-08
|
||||
7.399999999999998801e-01 2.154487783611315651e-08
|
||||
7.416666666666666963e-01 2.135181154056998901e-08
|
||||
7.433333333333332904e-01 2.116090314648889765e-08
|
||||
7.449999999999999956e-01 2.097212377417742691e-08
|
||||
7.466666666666665897e-01 2.078544499389019261e-08
|
||||
7.483333333333334059e-01 2.060083881779605820e-08
|
||||
7.500000000000000000e-01 2.041827769220850997e-08
|
||||
7.516666666666665941e-01 2.023773448986047171e-08
|
||||
7.533333333333332993e-01 2.005918250241342328e-08
|
||||
7.550000000000000044e-01 1.988259543300715027e-08
|
||||
7.566666666666667096e-01 1.970794738916072117e-08
|
||||
7.583333333333333037e-01 1.953521287556203333e-08
|
||||
7.599999999999998979e-01 1.936436678714065848e-08
|
||||
7.616666666666667140e-01 1.919538440231357548e-08
|
||||
7.633333333333333082e-01 1.902824137623867863e-08
|
||||
7.650000000000000133e-01 1.886291373433779472e-08
|
||||
7.666666666666666075e-01 1.869937786578347270e-08
|
||||
7.683333333333334236e-01 1.853761051726879840e-08
|
||||
7.700000000000000178e-01 1.837758878687452184e-08
|
||||
7.716666666666666119e-01 1.821929011783787269e-08
|
||||
7.733333333333333171e-01 1.806269229286720887e-08
|
||||
7.749999999999999112e-01 1.790777342811779587e-08
|
||||
7.766666666666667274e-01 1.775451196755162606e-08
|
||||
7.783333333333333215e-01 1.760288667738289432e-08
|
||||
7.799999999999999156e-01 1.745287664051361354e-08
|
||||
7.816666666666666208e-01 1.730446125118687474e-08
|
||||
7.833333333333333259e-01 1.715762020962761326e-08
|
||||
7.850000000000000311e-01 1.701233351704282816e-08
|
||||
7.866666666666666252e-01 1.686858147028946339e-08
|
||||
7.883333333333332194e-01 1.672634465708305349e-08
|
||||
7.900000000000000355e-01 1.658560395101963153e-08
|
||||
7.916666666666666297e-01 1.644634050676316584e-08
|
||||
7.933333333333333348e-01 1.630853575537531813e-08
|
||||
7.949999999999999289e-01 1.617217139965928020e-08
|
||||
7.966666666666667451e-01 1.603722940962488197e-08
|
||||
7.983333333333333393e-01 1.590369201808942332e-08
|
||||
7.999999999999999334e-01 1.577154171623564136e-08
|
||||
8.016666666666666385e-01 1.564076124937348188e-08
|
||||
8.033333333333333437e-01 1.551133361269191143e-08
|
||||
8.050000000000000488e-01 1.538324204720832969e-08
|
||||
8.066666666666666430e-01 1.525647003563696443e-08
|
||||
8.083333333333332371e-01 1.513100129843471658e-08
|
||||
8.100000000000000533e-01 1.500681978991802039e-08
|
||||
8.116666666666666474e-01 1.488390969444918677e-08
|
||||
8.133333333333333526e-01 1.476225542257474868e-08
|
||||
8.149999999999999467e-01 1.464184160746584814e-08
|
||||
8.166666666666665408e-01 1.452265310120673145e-08
|
||||
8.183333333333333570e-01 1.440467497126517943e-08
|
||||
8.199999999999999512e-01 1.428789249699296266e-08
|
||||
8.216666666666666563e-01 1.417229116623683953e-08
|
||||
8.233333333333332504e-01 1.405785667186510569e-08
|
||||
8.250000000000000666e-01 1.394457490861186366e-08
|
||||
8.266666666666666607e-01 1.383243196969003584e-08
|
||||
8.283333333333332549e-01 1.372141414370212119e-08
|
||||
8.299999999999999600e-01 1.361150791144756097e-08
|
||||
8.316666666666666652e-01 1.350269994286487373e-08
|
||||
8.333333333333333703e-01 1.339497709408880801e-08
|
||||
8.349999999999999645e-01 1.328832640432764461e-08
|
||||
8.366666666666665586e-01 1.318273509311794788e-08
|
||||
8.383333333333333748e-01 1.307819055733634102e-08
|
||||
8.399999999999999689e-01 1.297468036850652034e-08
|
||||
8.416666666666666741e-01 1.287219226991138080e-08
|
||||
8.433333333333332682e-01 1.277071417399567383e-08
|
||||
8.450000000000000844e-01 1.267023415964879515e-08
|
||||
8.466666666666666785e-01 1.257074046959427720e-08
|
||||
8.483333333333332726e-01 1.247222150785344985e-08
|
||||
8.499999999999999778e-01 1.237466583715033664e-08
|
||||
8.516666666666666829e-01 1.227806217652134765e-08
|
||||
8.533333333333333881e-01 1.218239939883500653e-08
|
||||
8.549999999999999822e-01 1.208766652838345038e-08
|
||||
8.566666666666665764e-01 1.199385273852943676e-08
|
||||
8.583333333333332815e-01 1.190094734947819867e-08
|
||||
8.599999999999999867e-01 1.180893982590323440e-08
|
||||
8.616666666666666918e-01 1.171781977475372466e-08
|
||||
8.633333333333332860e-01 1.162757694308454006e-08
|
||||
8.649999999999998801e-01 1.153820121588110024e-08
|
||||
8.666666666666666963e-01 1.144968261394877284e-08
|
||||
8.683333333333332904e-01 1.136201129182400759e-08
|
||||
8.699999999999999956e-01 1.127517753573424751e-08
|
||||
8.716666666666665897e-01 1.118917176159198780e-08
|
||||
8.733333333333334059e-01 1.110398451302235871e-08
|
||||
8.750000000000000000e-01 1.101960645941020503e-08
|
||||
8.766666666666665941e-01 1.093602839401977062e-08
|
||||
8.783333333333332993e-01 1.085324123207920940e-08
|
||||
8.800000000000000044e-01 1.077123600896318528e-08
|
||||
8.816666666666667096e-01 1.069000387835297257e-08
|
||||
8.833333333333333037e-01 1.060953611051815378e-08
|
||||
8.849999999999998979e-01 1.052982409048395294e-08
|
||||
8.866666666666667140e-01 1.045085931638380284e-08
|
||||
8.883333333333333082e-01 1.037263339768496325e-08
|
||||
8.900000000000000133e-01 1.029513805359657539e-08
|
||||
8.916666666666666075e-01 1.021836511140186732e-08
|
||||
8.933333333333334236e-01 1.014230650488078171e-08
|
||||
8.950000000000000178e-01 1.006695427264572650e-08
|
||||
8.966666666666666119e-01 9.992300556679207259e-09
|
||||
8.983333333333333171e-01 9.918337600745895184e-09
|
||||
8.999999999999999112e-01 9.845057748929442197e-09
|
||||
9.016666666666667274e-01 9.772453444094858069e-09
|
||||
9.033333333333333215e-01 9.700517226510004005e-09
|
||||
9.049999999999999156e-01 9.629241732331423638e-09
|
||||
9.066666666666666208e-01 9.558619692283719409e-09
|
||||
9.083333333333333259e-01 9.488643930180032504e-09
|
||||
9.100000000000000311e-01 9.419307361657381304e-09
|
||||
9.116666666666666252e-01 9.350602992777571408e-09
|
||||
9.133333333333332194e-01 9.282523918710001498e-09
|
||||
9.150000000000000355e-01 9.215063322447187502e-09
|
||||
9.166666666666666297e-01 9.148214473575396844e-09
|
||||
9.183333333333333348e-01 9.081970726925700499e-09
|
||||
9.199999999999999289e-01 9.016325521431505870e-09
|
||||
9.216666666666667451e-01 8.951272378854467038e-09
|
||||
9.233333333333333393e-01 8.886804902622282763e-09
|
||||
9.249999999999999334e-01 8.822916776661787834e-09
|
||||
9.266666666666666385e-01 8.759601764205443938e-09
|
||||
9.283333333333333437e-01 8.696853706684206389e-09
|
||||
9.300000000000000488e-01 8.634666522603989519e-09
|
||||
9.316666666666666430e-01 8.573034206450921255e-09
|
||||
9.333333333333332371e-01 8.511950827591616428e-09
|
||||
9.350000000000000533e-01 8.451410529212845376e-09
|
||||
9.366666666666666474e-01 8.391407527299304141e-09
|
||||
9.383333333333333526e-01 8.331936109551314815e-09
|
||||
9.399999999999999467e-01 8.272990634416855476e-09
|
||||
9.416666666666665408e-01 8.214565530084408238e-09
|
||||
9.433333333333333570e-01 8.156655293449003333e-09
|
||||
9.449999999999999512e-01 8.099254489222038774e-09
|
||||
9.466666666666666563e-01 8.042357748948282073e-09
|
||||
9.483333333333332504e-01 7.985959770017702085e-09
|
||||
9.500000000000000666e-01 7.930055314828554130e-09
|
||||
9.516666666666666607e-01 7.874639209806676320e-09
|
||||
9.533333333333332549e-01 7.819706344574867867e-09
|
||||
9.549999999999999600e-01 7.765251671021222332e-09
|
||||
9.566666666666666652e-01 7.711270202443769926e-09
|
||||
9.583333333333333703e-01 7.657757012728165687e-09
|
||||
9.599999999999999645e-01 7.604707235476974347e-09
|
||||
9.616666666666665586e-01 7.552116063192771580e-09
|
||||
9.633333333333333748e-01 7.499978746463553073e-09
|
||||
9.649999999999999689e-01 7.448290593170392285e-09
|
||||
9.666666666666666741e-01 7.397046967677337799e-09
|
||||
9.683333333333332682e-01 7.346243290102658937e-09
|
||||
9.700000000000000844e-01 7.295875035473213223e-09
|
||||
9.716666666666666785e-01 7.245937733077665596e-09
|
||||
9.733333333333332726e-01 7.196426965634166866e-09
|
||||
9.749999999999999778e-01 7.147338368597130869e-09
|
||||
9.766666666666666829e-01 7.098667629435502836e-09
|
||||
9.783333333333333881e-01 7.050410486950454502e-09
|
||||
9.799999999999999822e-01 7.002562730545970454e-09
|
||||
9.816666666666665764e-01 6.955120199529657999e-09
|
||||
9.833333333333332815e-01 6.908078782489885956e-09
|
||||
9.849999999999999867e-01 6.861434416587950486e-09
|
||||
9.866666666666666918e-01 6.815183086926430052e-09
|
||||
9.883333333333332860e-01 6.769320825889527906e-09
|
||||
9.899999999999998801e-01 6.723843712493391200e-09
|
||||
9.916666666666666963e-01 6.678747871810286573e-09
|
||||
9.933333333333332904e-01 6.634029474300308528e-09
|
||||
9.949999999999999956e-01 6.589684735217115509e-09
|
||||
9.966666666666665897e-01 6.545709914067291268e-09
|
||||
9.983333333333334059e-01 6.502101313897288710e-09
|
||||
@@ -1,753 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Dose_calculator.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Rodion Kolevatov
|
||||
* Date: August 2018
|
||||
* Version: $Revision: 1.0 $
|
||||
* Release: ---
|
||||
* Origin: IFE
|
||||
*
|
||||
* Calculating dose rate at the outer surface of lateral shielding of uniform thickness
|
||||
* made of material specified in the component input (concrete, iron or lead).
|
||||
* Shielding starts at a distance 0.5*Innerspace from the center of the guide.
|
||||
*
|
||||
* %D
|
||||
* A Shielding_logger together with a set of Shielding_iterators is required.
|
||||
* Iterators should contain Monitor_nD components for recording capture rates.
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
* Shielding type: Concrete, Iron or Lead
|
||||
* Names of text files where the coating capture rates are recorded
|
||||
* Inner space in the shielding given by parameter Innerspace (in meters).
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Dose_calculator
|
||||
DEFINITION PARAMETERS ()
|
||||
SETTING PARAMETERS (string Material = "Fe", double Innerspace=0.3, double Thickness=0.2, string SteelTubing="", double TubingThickness=0.0, string NiCaptureFile="NiCapture.dat",
|
||||
string TiCaptureFile = "TiCapture.dat", string TotalCaptureFile = "TotalCapture.dat", string OutputFile="Dose.dat")
|
||||
OUTPUT PARAMETERS ()
|
||||
|
||||
SHARE
|
||||
%{
|
||||
#ifndef LIN_INT_ROUTINE
|
||||
#define LIN_INT_ROUTINE 1
|
||||
//Multi-d linear interpolation routine. Array of args, number of args, sizes of args in interpolation grid, argument grid in single line, data in single line
|
||||
double lint (double * args, int Narg, int * sizearg, double * argtable, double * datatable)
|
||||
{
|
||||
if (Narg==1) {
|
||||
// printf ("Narg=1, arg = %g\n", *args);
|
||||
int point=0;
|
||||
if ((*args)<(*argtable) ) return *datatable;
|
||||
else if ((*args)>*(argtable+ *sizearg-1) ) return * (datatable+ *sizearg-1); // if the value is too large return what corresponds to largest point on the grid available
|
||||
else { // now argument is withing the range of values
|
||||
//interval lookup
|
||||
while (*args>*(argtable+point)) point++;
|
||||
//weights
|
||||
double interval = *(argtable + point) - *(argtable+point-1);
|
||||
double weightup = (*args - *(argtable+point-1))/interval;
|
||||
double weightlow =(*(argtable + point) - *args)/interval;
|
||||
return weightup*(*(datatable+point))+weightlow*(*(datatable+point-1));
|
||||
}//arg within range of values
|
||||
}// if Narg==1
|
||||
else if (Narg >1){//if more than one argument
|
||||
//lookup how large is the data (Narg-1)D slice for fixed value of the first argument
|
||||
int slicesize=1;
|
||||
int i,point=0;
|
||||
for ( i=1;i<Narg;i++) slicesize*=sizearg[i];
|
||||
// printf("Narg > 1, slicesize = %d, arggridstart = %g, argument = %g, arggridend = %g\n",slicesize,*argtable,*args, *(argtable+ *sizearg-1) );
|
||||
//search weights for the first argument and get results with one argument less
|
||||
if ((*args)<(*argtable) ) return lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), datatable);
|
||||
// if the value is too low -- return what is on the lower bound
|
||||
else if ((*args)>*(argtable+ *sizearg-1) ) return lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), (datatable+ slicesize*(*sizearg)));
|
||||
// if the value is too large return what corresponds to largest point on the grid available
|
||||
else { // now argument is withing the range of values
|
||||
//interval lookup
|
||||
while (*args>*(argtable+point)) {
|
||||
// printf ("*(argtable+point) = %g\n", *(argtable+point));
|
||||
point++;}
|
||||
//weights
|
||||
double interval = *(argtable + point) - *(argtable+point-1);
|
||||
double weightup =(*args - *(argtable+point-1))/interval;
|
||||
double weightlow =(*(argtable + point) - *args)/interval;
|
||||
return weightup*lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), datatable+point*slicesize )
|
||||
+weightlow*lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), datatable+(point-1)*slicesize);
|
||||
} // argument within the ragne
|
||||
} //Narg>1
|
||||
};
|
||||
#endif
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
||||
//*** NEUTRON CONVERSION DATA *****//
|
||||
#ifndef NEUTRON_GAMMA_DATA
|
||||
#define NEUTRON_GAMMA_DATA 1
|
||||
//Photons per capture in NiTi coating
|
||||
double fraction[]={0.003565789, 0.009694611, 0.028838269, 0.149117282, 0.117348519, 0.042269932, 0.386434136, 0.092896131, 0.046767054, 0.032512648, 0.043547581, 0.040537585, 0.510133557, 0.320364465};
|
||||
double energy [] = {0.150,
|
||||
0.200,
|
||||
0.300,
|
||||
0.400,
|
||||
0.500,
|
||||
0.600,
|
||||
0.800,
|
||||
1.,
|
||||
1.50,
|
||||
2.000,
|
||||
3.0,
|
||||
4.0,
|
||||
5.000,
|
||||
6.000,
|
||||
7.0,
|
||||
8.000,
|
||||
9.0,
|
||||
10.000,
|
||||
11.000};
|
||||
int nEgroup= 19;
|
||||
//Spectrum of capture photons from Ni and Ti
|
||||
//Ni gamma capture specrum
|
||||
double fractionNi[]={0.003722,//150
|
||||
0.015513,//200
|
||||
0.048432,//300
|
||||
0.047485,//400
|
||||
0.198059,//500
|
||||
0.002809,//600
|
||||
0.003142,//800
|
||||
0.06579,//1000
|
||||
0.054534,//1500
|
||||
0.028872,//2000
|
||||
0.063882,//3000
|
||||
0.050286,//4000
|
||||
0.035567,//5000
|
||||
0.080326,//6000
|
||||
0.156571,//7000
|
||||
0.130355,//8000
|
||||
0.534153,//9000
|
||||
0.000558,//10000
|
||||
0.000260};//11000
|
||||
|
||||
|
||||
//Ti capture gamma spectrum
|
||||
double fractionTi[]={0.009326, //0.15
|
||||
0.0, //0.2
|
||||
0.001938,//0.3
|
||||
0.302632,//0.4
|
||||
0.000882,//0.5
|
||||
0.000668, //0.6
|
||||
0.000914, //0.8
|
||||
0.023046,//1.0
|
||||
0.947104,//1.5
|
||||
0.232257,//2.0
|
||||
0.086418,//3.0
|
||||
0.162878,//4.0
|
||||
0.11209,//5.0
|
||||
0.013419,//6.0
|
||||
0.0875051, //7.0
|
||||
0.009083,//8.0
|
||||
0.001923, //9.0
|
||||
0.002189,//10.0
|
||||
0.000332};//11.0
|
||||
//double fractionB[]={0.0, 0.0, 0.0, 0.0, 0.93, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,0.0,0.0,0.0};
|
||||
double fractionB[]={0,//0.15
|
||||
0,//0.2
|
||||
0,//0.3
|
||||
2.32983E-06,//0.4
|
||||
0.935769511,//0.5
|
||||
1.94926E-06,//0.6
|
||||
2.22356E-05,//0.8
|
||||
3.29279E-05,//1.0
|
||||
0.000248357,//1.5
|
||||
0.000398671,//2.0
|
||||
0.000410038,//3.0
|
||||
0.001042575,//4.0
|
||||
0.000961964,//5.0
|
||||
8.714E-05,//6.0
|
||||
0.000248803,//7.0
|
||||
0.00017111,//8.0
|
||||
3.9074E-05,//9.0
|
||||
7.28E-07,//10.0
|
||||
6.27e-6};//11.0
|
||||
|
||||
/*
|
||||
//conversion test input
|
||||
double fraction [] = {0.5,0.5};
|
||||
double energy [] = {2.0,2.0};
|
||||
int nEgroup= 2;
|
||||
*/
|
||||
//*** SHIELDING DATA TABLES ****//
|
||||
// Mashkovich set + NIST data for 15 MeV
|
||||
// Linear attenuation for concrete
|
||||
double AttenuationArgsConc[]={0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.25, 1.5, 2.0, 2.75, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 15.0}; // in meV
|
||||
double AttenuationDataConc[]={31.7, 28.5, 24.6, 21.9, 20.0, 18.5, 16.3, 14.6, 13.1, 11.9, 10.3, 8.74, 8.37, 7.34, 6.65, 6.19, 5.61, 5.29, 4.8208}; // in m^-1
|
||||
int AttenuationSizeConc[]={18};
|
||||
// Iron
|
||||
double AttenuationArgsFe[]={0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.25, 1.5, 2.0, 2.75, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 15.0}; // in meV
|
||||
double AttenuationDataFe[]={139., 106., 83.3, 71.7, 64.6, 59.5, 52.0, 46.7, 42.2, 38.1, 33.3, 29.1, 28.4, 26.0, 24.8, 24.0, 23.4, 23.4, 24.3}; //in m^-1
|
||||
int AttenuationSizeFe[]={19};
|
||||
double AttenuationArgsPb[]={0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.25, 1.5, 2.0, 2.75, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 15.0}; // in meV
|
||||
double AttenuationDataPb[]={2180., 1070., 425., 244., 170., 133., 95.2, 77.1, 65.8, 57.7, 50.8, 47.6, 46.8, 47.2, 48.1, 49.4, 52.0, 55.0, 64.2}; //in m^-1
|
||||
int AttenuationSizePb[]={19};
|
||||
/*
|
||||
//NIST set
|
||||
//Concrete
|
||||
double AttenuationArgsConc[]={
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.6,
|
||||
0.8,
|
||||
1.,
|
||||
1.25,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
8.,
|
||||
10.,
|
||||
15.};
|
||||
|
||||
double AttenuationDataConc[]={
|
||||
33.028,
|
||||
29.486,
|
||||
25.231,
|
||||
22.5009,
|
||||
20.5045,
|
||||
18.9428,
|
||||
16.6221,
|
||||
14.9385,
|
||||
13.3561,
|
||||
12.1624,
|
||||
10.4811,
|
||||
8.5123,
|
||||
7.3991,
|
||||
6.6884,
|
||||
6.2031,
|
||||
5.5936,
|
||||
5.2394,
|
||||
4.8208};
|
||||
int AttenuationSizeConc[]={18};
|
||||
|
||||
|
||||
|
||||
|
||||
double AttenuationArgsFe[]={
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.6,
|
||||
0.8,
|
||||
1.,
|
||||
1.25,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
8.,
|
||||
10.,
|
||||
15.};
|
||||
|
||||
double AttenuationDataFe[]={
|
||||
1.55E+02,
|
||||
1.15E+02,
|
||||
8.65E+01,
|
||||
7.40E+01,
|
||||
6.63E+01,
|
||||
6.07E+01,
|
||||
5.27E+01,
|
||||
4.72E+01,
|
||||
4.21E+01,
|
||||
3.84E+01,
|
||||
3.36E+01,
|
||||
2.85E+01,
|
||||
2.61E+01,
|
||||
2.48E+01,
|
||||
2.41E+01,
|
||||
2.36E+01,
|
||||
2.36E+01,
|
||||
2.43E+01};
|
||||
int AttenuationSizeFe[]={18};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
double AttenuationArgsPb[]={
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.6,
|
||||
0.8,
|
||||
1.,
|
||||
1.25,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
8.,
|
||||
10.,
|
||||
15.}; // in meV
|
||||
double AttenuationDataPb[]={
|
||||
2.28E+03,
|
||||
1.13E+03,
|
||||
4.57E+02,
|
||||
2.63E+02,
|
||||
1.83E+02,
|
||||
1.42E+02,
|
||||
1.01E+02,
|
||||
8.05E+01,
|
||||
6.66E+01,
|
||||
5.92E+01,
|
||||
5.22E+01,
|
||||
4.80E+01,
|
||||
4.76E+01,
|
||||
4.84E+01,
|
||||
4.98E+01,
|
||||
5.30E+01,
|
||||
5.64E+01,
|
||||
6.42E+01
|
||||
}; //in m^-1
|
||||
int AttenuationSizePb[]={18};
|
||||
*/
|
||||
|
||||
/*
|
||||
//Linear attenuation test input
|
||||
double AttenuationArgs[]={0.15, 10.0}; // in meV
|
||||
double AttenuationData[]={7.0, 7.0 }; // in m^-1
|
||||
int AttenuationSize[]={2};
|
||||
*/
|
||||
|
||||
// Dose buildup factors concrete
|
||||
double BuildupDataConc[]={1., 1.74, 2.26, 2.95, 3.79, 4.51, 5.57, 6.51, 3.18,
|
||||
1., 2.82, 5.13, 11.2, 24.2, 42.7, 87.6, 153., 353.,
|
||||
1., 2.52, 4.66, 10.8, 25.6, 48.2, 107., 198., 497.,
|
||||
1., 2.27, 4.03, 8.97, 20.2, 30.4, 75.6, 131, 292,
|
||||
1., 1.98, 3.24, 6.42, 12.7, 20.7, 37.2, 57.1, 106,
|
||||
1., 1.77, 2.65, 4.61, 7.97, 11.7, 18.6, 26.0, 42.2,
|
||||
1., 1.67, 2.38, 3.84, 6.20, 8.71, 13.1, 17.7, 27.4,
|
||||
1., 1.61, 2.18, 3.37, 5.23, 7.15, 10.5, 13.9, 20.9,
|
||||
1., 1.49, 1.93, 2.80, 4.14, 5.52, 7.86, 10.2, 15.5,
|
||||
1., 1.41, 1.76, 2.45, 3.51, 4.59, 6.43, 8.31, 12.2,
|
||||
1., 1.35, 1.64, 2.22, 3.10, 4.01, 5.57, 7.19, 10.6,
|
||||
1., 1.26, 1.46, 1.86, 2.50, 3.16, 4.34, 5.59, 8.27};
|
||||
|
||||
int BuildupSizeConc[] ={12, //energy
|
||||
9}; // mu d
|
||||
double BuildupArgsConc[]={
|
||||
0.05, 0.15, 0.3, 0.5, 1.0, 2.0, 3.0, 4.0, 6.0, 8.0, 10.0, 15.0 // energy in MeV
|
||||
,
|
||||
0., 1., 2., 4., 7., 10., 15., 20., 30. //mu d
|
||||
};
|
||||
//Dose buildup factors Fe
|
||||
double BuildupDataFe[]={
|
||||
1., 1.5, 2.2, 3.1, 4.1, 4.6, 5.4, 5.9, //0.1
|
||||
1., 2.0, 3.1, 5.3, 8.9, 14., 22., 31., //0.2
|
||||
1., 2.1, 3.3, 6.0, 12., 23., 49., 84., //0.4
|
||||
1., 1.98, 3.09, 5.98, 11.7, 19.2, 35.4, 55.6, //0.5
|
||||
1., 1.87, 2.89, 5.39, 10.2, 16.2, 28.3, 42.7, //1.0
|
||||
1., 1.76, 2.43, 4.13, 7.25, 10.9, 17.6, 25.1, //2.0
|
||||
1., 1.55, 2.15, 3.51, 5.85, 8.51, 13.5, 19.1, //3.0
|
||||
1., 1.45, 1.94, 3.03, 4.91, 7.11, 11.2, 16.0, //4.0
|
||||
1., 1.34, 1.72, 2.58, 4.14, 6.02, 9.89, 14.7, //6.0
|
||||
1., 1.27, 1.56, 2.23, 3.49, 5.07, 8.50, 13.0, //8.0
|
||||
1., 1.20, 1.42, 1.95, 2.99, 4.35, 7.54, 12.4, //9.0
|
||||
1., 1.48, 1.86, 2.72, 4.30 , 6.37, 11.4, 19.1};//15.0
|
||||
int BuildupSizeFe[]={12, // energy
|
||||
8}; // mu d
|
||||
double BuildupArgsFe[]={0.1, 0.2, 0.4, 0.5, 1.0, 2.0, 3.0, 4.0, 6.0, 8.0, 10.0, 15.0, // energy in MeV
|
||||
0., 1., 2., 4., 7., 10., 15., 20.0};
|
||||
|
||||
|
||||
//Dose buildup factors Pb
|
||||
double BuildupDataPb[]={1., 1.01, 1.03, 1.06, 1.15, 1.16, 1.18, 1.19,
|
||||
1., 1.11, 1.17, 1.25, 1.34, 1.41, 1.5, 1.56,
|
||||
1., 1.17, 1.29, 1.46, 1.58, 1.72, 1.89, 2.02,
|
||||
1., 1.24, 1.42, 1.69, 2.00, 2.27, 2.65, 2.73,
|
||||
1., 1.37, 1.69, 2.26, 3.02, 3.74, 4.81, 5.86,
|
||||
1., 1.39, 1.76, 2.51, 3.66, 4.84, 6.87, 9.00,
|
||||
1., 1.34, 1.68, 2.43, 3.75, 5.30, 8.44, 12.3,
|
||||
1., 1.27, 1.56, 2.25, 3.61, 5.44, 9.80, 16.3,
|
||||
1., 1.21, 1.46, 2.08, 3.44, 5.55, 11.7, 23.6,
|
||||
1., 1.18, 1.40, 1.97, 3.34, 5.69, 13.8, 32.7,
|
||||
1., 1.14, 1.30, 1.74, 2.89, 5.07, 14.1, 44.6,
|
||||
1., 1.11, 1.23, 1.58, 2.52, 4.34, 12.5, 39.2};
|
||||
|
||||
int BuildupSizePb[]={12, // energy
|
||||
8}; // mu d
|
||||
double BuildupArgsPb[]={0.15, 0.30, 0.40, 0.5, 1.0, 2.0, 3.0, 4.0, 5.1, 6.0, 8.0, 10.0, // energy in MeV
|
||||
0., 1., 2., 4., 7., 10., 15., 20.0};
|
||||
|
||||
|
||||
|
||||
|
||||
// Flux-to-dose conversion
|
||||
/* //NRB-99?
|
||||
double FtoDArgs[]= {0.15, 0.20, 0.30, 0.40, 0.50, 0.60, 0.80, 1.0, 2.0, 4.0, 6.0, 8.0, 10.0}; // in meV
|
||||
double FtoDData[] = {3600*0.752E-10, 3600*1.00E-10, 3600*1.51E-10, 3600*2.00E-10, 3600*2.47E-10, 3600*2.91E-10, 3600*3.73E-10, 3600*4.48E-10, 3600*7.49E-10, 3600*12.0E-10, 3600*16.0E-10, 3600*19.9E-10, 3600*23.8E-10}; // from phot/s/m2 to mkSv/hr conversion
|
||||
int nFtoDgroups= 13;
|
||||
int FtoDSize[] = {13};
|
||||
*/
|
||||
//ESS
|
||||
double FtoDArgs[]= {
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.511,
|
||||
0.6,
|
||||
0.662,
|
||||
0.8,
|
||||
1.,
|
||||
1.12,
|
||||
1.33,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
6.13,
|
||||
8.,
|
||||
10.,
|
||||
15.}; // in MeV
|
||||
double FtoDData[] = {
|
||||
2.69E-07,
|
||||
3.60E-07,
|
||||
5.44E-07,
|
||||
7.20E-07,
|
||||
8.89E-07,
|
||||
9.07E-07,
|
||||
1.05E-06,
|
||||
1.14E-06,
|
||||
1.34E-06,
|
||||
1.62E-06,
|
||||
1.76E-06,
|
||||
2.01E-06,
|
||||
2.20E-06,
|
||||
2.69E-06,
|
||||
3.51E-06,
|
||||
4.21E-06,
|
||||
4.82E-06,
|
||||
5.40E-06,
|
||||
5.47E-06,
|
||||
6.70E-06,
|
||||
7.92E-06,
|
||||
1.09E-05
|
||||
}; // from phot/s/m2 to mkSv/hr conversion
|
||||
int nFtoDgroups= 22;
|
||||
int FtoDSize[] = {22};
|
||||
|
||||
|
||||
|
||||
// test input flux to dose
|
||||
/*
|
||||
double FtoDArgs[]= {0.15, 10.0}; // in meV
|
||||
double FtoDData[] = {3600*7.0E-10,3600*7.0E-10}; // from phot/s/m2 to mkSv/hr conversion
|
||||
int nFtoDgroups= 2;
|
||||
int FtoDSize[] = {2};
|
||||
*/
|
||||
#endif //end of insertion of datatables.
|
||||
/*** end of insertion to DECLARE section **/
|
||||
%}
|
||||
|
||||
FINALLY
|
||||
%{
|
||||
|
||||
/** Define material for dose calculation **/
|
||||
|
||||
int imat=0, itubing=0;
|
||||
if(strcmp(SteelTubing,"yes")==0||strcmp(SteelTubing,"Yes")==0||strcmp(SteelTubing,"YES")==0||strcmp(SteelTubing,"y")==0||strcmp(SteelTubing,"Y")==0||strcmp(SteelTubing,"1")==0){
|
||||
itubing=1;
|
||||
imat=0;
|
||||
printf("Calculating dose for STEEL TUBING\n Outer material will be CONCRETE\n");}
|
||||
else if((strcmp(Material,"Fe")==0)||(strcmp(Material,"fe")==0)||(strcmp(Material,"Iron")==0)||(strcmp(Material,"iron")==0)||(strcmp(Material,"IRON")==0)){
|
||||
itubing=0;
|
||||
imat=1;
|
||||
printf("Calculating dose for IRON\n");}
|
||||
else if ((strcmp(Material,"Pb")==0)||(strcmp(Material,"pb")==0)||(strcmp(Material,"Lead")==0)||(strcmp(Material,"lead")==0)||(strcmp(Material,"LEAD")==0))
|
||||
{itubing=0;
|
||||
imat=2;
|
||||
printf("Calculating dose for LEAD\n");}
|
||||
else if((strcmp(Material,"Conc")==0)||(strcmp(Material,"Concrete")==0)||(strcmp(Material,"conc")==0)||(strcmp(Material,"concrete")==0))
|
||||
{itubing=0;
|
||||
imat=0;
|
||||
printf("Calculating dose for CONCRETE\n");}
|
||||
else
|
||||
{
|
||||
printf ("No/wrong material specified for dose calculation, possible options: Fe, Pb, concrete\n");
|
||||
printf ("Using default: concrete\n");
|
||||
}
|
||||
/**Reading datafiles with capture per bin**/
|
||||
|
||||
#ifdef _WIN32
|
||||
#define separator "\\"
|
||||
#else
|
||||
#define separator "/"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
double d1, d2, d3, d4;
|
||||
int ibin=0,NBINS;
|
||||
char line[1000],line1[1000];
|
||||
char dirname[1000];
|
||||
memset(dirname,0,sizeof(dirname));
|
||||
strcat(strcat(dirname,mcdirname),separator);
|
||||
|
||||
char filename[1000];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FILE *dataIn;
|
||||
|
||||
memset(filename,0,sizeof(filename));//resetting filename to NULL string
|
||||
strcat(strcat(filename,dirname),NiCaptureFile);
|
||||
|
||||
//printf("Shielding calculator:\n Reading file %s\n",filename);
|
||||
|
||||
if( access( filename, R_OK ) != -1 ) {
|
||||
// file exists
|
||||
dataIn=fopen(filename,"r");
|
||||
} else {
|
||||
// file doesn't exist
|
||||
printf("Shielding calculator could not find file\n%s\nexiting.",NiCaptureFile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (dataIn==NULL) {printf("Can't open file\n"); exit(0);};
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4) ibin++;
|
||||
};
|
||||
|
||||
|
||||
NBINS=ibin;
|
||||
|
||||
//printf("Shielding calculator:\n Input file contains %d bins.\n", NBINS);
|
||||
|
||||
double* zhat = malloc(NBINS*sizeof(double));
|
||||
double* Ihat= malloc(NBINS*sizeof(double));
|
||||
double* IhatNi= malloc(NBINS*sizeof(double));
|
||||
double* IhatTi= malloc(NBINS*sizeof(double));
|
||||
rewind(dataIn);
|
||||
ibin=0;
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
zhat[ibin]=d1;
|
||||
IhatNi[ibin]=d2;
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
|
||||
//printf("Shielding calculator:\n Closing file %s...",filename);
|
||||
fclose(dataIn);
|
||||
//printf("done\n");
|
||||
|
||||
memset(filename,0,sizeof(filename));// setting filename to NULL string
|
||||
strcat(strcat(filename,dirname),TiCaptureFile); //setting filename to TiCapture file
|
||||
//printf("Shielding calculator:\n Next input: %s\n",filename);
|
||||
|
||||
if( access( filename, R_OK ) != -1 ) {
|
||||
// file exists
|
||||
dataIn=fopen(filename,"r");
|
||||
} else {
|
||||
// file doesn't exist
|
||||
printf("Shielding calculator could not find file\n%s\nexiting.",TiCaptureFile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ibin=0;
|
||||
if (dataIn==NULL) {printf("Can't open file\n"); exit(0);};
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
if (ibin!=NBINS){printf("Shielding calculator:\nMismatch in number of bins between input files.\nNo shielding calculation performed, exiting\n");
|
||||
exit(0);}
|
||||
|
||||
rewind(dataIn);
|
||||
|
||||
|
||||
//printf("Shielding calculator:\n Reading file %s\n",filename);
|
||||
ibin=0;
|
||||
|
||||
while (fgets(line, 1000,dataIn))
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
zhat[ibin]=d1;
|
||||
IhatTi[ibin]=d2;
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
fclose(dataIn);
|
||||
|
||||
|
||||
memset(filename,0,sizeof(filename));
|
||||
strcat(strcat(filename,dirname),TotalCaptureFile);
|
||||
//printf("Shielding calculator:\n Next input: %s\n",filename);
|
||||
|
||||
if( access( filename, R_OK ) != -1 ) {
|
||||
// file exists
|
||||
dataIn=fopen(filename,"r");
|
||||
} else {
|
||||
// file doesn't exist
|
||||
printf("Shielding calculator could not find file\n%s\nexiting.",TotalCaptureFile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
ibin=0;
|
||||
if (dataIn==NULL) {printf("Can't open file\n"); exit(0);};
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
if (ibin!=NBINS){printf("Shielding calculator:\nMismatch in number of bins between input files.\nNo shielding calculation performed, exiting\n");
|
||||
exit(0);}
|
||||
|
||||
rewind(dataIn);
|
||||
|
||||
//printf("Shielding calculator:\n Reading file %s\n",filename);
|
||||
ibin=0;
|
||||
while (fgets(line, 1000,dataIn))
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
zhat[ibin]=d1;
|
||||
Ihat[ibin]=d2;
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
//printf("Shielding calculator:\n Closing file %s...",filename);
|
||||
fclose(dataIn);
|
||||
//printf("done\n");
|
||||
|
||||
int i,iz,iEgroup; // Auxiliary variables
|
||||
|
||||
double zbinlength = zhat[2]-zhat[1];
|
||||
|
||||
|
||||
|
||||
double RRR = (0.5*Innerspace)+Thickness+itubing*TubingThickness;
|
||||
double* doseUnshielded= malloc(NBINS*sizeof(double));
|
||||
double* doseShielded= malloc(NBINS*sizeof(double));
|
||||
|
||||
|
||||
|
||||
|
||||
/*Moving along the bins, calculating the dose */
|
||||
|
||||
|
||||
|
||||
for ( iz=0; iz< NBINS; iz++)
|
||||
{double zc=zhat[iz]; // the z-value for the calculation
|
||||
double z;
|
||||
doseShielded[iz]=0.0;
|
||||
doseUnshielded[iz]=0.0;
|
||||
|
||||
/*computing the integral*/
|
||||
double dmfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup], fracB=fractionB[iEgroup];
|
||||
doseUnshielded[iz]+=(fracNi* IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926/(RRR*RRR+z*z)*lint(&En, 1, FtoDSize, FtoDArgs,FtoDData);
|
||||
if (imat==2){//LEAD
|
||||
dmfp=lint(&En,1,AttenuationSizePb, AttenuationArgsPb, AttenuationDataPb)*Thickness*sqrt(RRR*RRR+z*z)/RRR;
|
||||
double args[]={En,dmfp};
|
||||
doseShielded[iz] += (fracNi* IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926
|
||||
*lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)
|
||||
*exp(-dmfp)/(RRR*RRR+z*z)*lint(args, 2, BuildupSizePb,BuildupArgsPb,BuildupDataPb);}
|
||||
else if (imat==1){//IRON
|
||||
dmfp=lint(&En,1,AttenuationSizeFe, AttenuationArgsFe, AttenuationDataFe)*Thickness*sqrt(RRR*RRR+z*z)/RRR;
|
||||
double args[]={En,dmfp};
|
||||
doseShielded[iz] += (fracNi* IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926
|
||||
*lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)
|
||||
*exp(-dmfp)/(RRR*RRR+z*z)*lint(args, 2, BuildupSizeFe,BuildupArgsFe,BuildupDataFe);}
|
||||
else {//CONCRETE, imat=0, default
|
||||
dmfp=lint(&En,1,AttenuationSizeConc, AttenuationArgsConc, AttenuationDataConc)*Thickness*sqrt(RRR*RRR+z*z)/RRR + itubing*lint(&En,1,AttenuationSizeFe, AttenuationArgsFe, AttenuationDataFe)*TubingThickness*sqrt(RRR*RRR+z*z)/RRR;
|
||||
double args[]={En,dmfp};
|
||||
doseShielded[iz] += (fracNi* IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926
|
||||
*lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)
|
||||
*exp(-dmfp)/(RRR*RRR+z*z)*lint(args, 2, BuildupSizeConc,BuildupArgsConc,BuildupDataConc);}
|
||||
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
} /* Position scan iz */
|
||||
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define separator "\\"
|
||||
#else
|
||||
#define separator "/"
|
||||
#endif
|
||||
|
||||
FILE *dose_out;
|
||||
memset(filename,0,sizeof(filename));
|
||||
strcat(strcat(filename,dirname),OutputFile);
|
||||
printf("Dose calculator:\nWriting to file %s\n",filename);
|
||||
dose_out=fopen(filename,"w");
|
||||
|
||||
|
||||
fprintf(dose_out,"#Dose at the outer surface of lateral %s shielding of thickness %g m\n#Guide is in the center of the innner space of width %g m\n#Presense of Steel Tubing = %s; of %g m\n#Position z,m\tOverall loss, n/s/m\tNi capture, n/s/m,\tTi capture, n/s/m\tDose unshielded, uSv/h\tDose shielded, uSv/h\n",Material, Thickness, Innerspace, SteelTubing,TubingThickness);
|
||||
|
||||
|
||||
for ( i=0; i< NBINS; i++)
|
||||
{
|
||||
fprintf( dose_out,"%g\t%.3g\t%.3g\t%.3g\t%.3g\t%.3g\n",zhat[i], Ihat[i]/zbinlength, IhatNi[i]/zbinlength, IhatTi[i]/zbinlength,doseUnshielded[i],doseShielded[i]);
|
||||
}
|
||||
fclose(dose_out);
|
||||
free(zhat); free(Ihat); free(IhatNi); free(IhatTi);
|
||||
free(doseShielded); free(doseUnshielded);
|
||||
|
||||
printf("Done with writing dose rates\n");
|
||||
%}
|
||||
|
||||
END
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,12 +49,12 @@
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE INSTRUMENT ESS_reflectometer_Estia
|
||||
(double omegaa = 25, int sample = 0, double sample_length = 0.02, double sample_height = 0.015,
|
||||
(double omegaa = 1.2, int sample = 0, double sample_length = 0.01, double sample_height = 0.01,
|
||||
int operationmode = 0, double over_illumination = 0.0, double theta_resolution = 0.04,
|
||||
double lambda_min = 3.75, double lambda_start = 0.1, double lambda_end = 12.0,
|
||||
double lambda_min = 3.75, double lambda_start = 3.0, double lambda_end = 12.0,
|
||||
int enable_chopper = 0, int enable_gravity=0, int enable_windows=1,
|
||||
int enable_polarizer = 0, int enable_analyzer = 0,
|
||||
double source_power = 5,
|
||||
double source_power = 2,
|
||||
double selene1_foot1y =0.0, double selene1_foot2y = 0.0
|
||||
)
|
||||
|
||||
@@ -253,20 +253,6 @@ COMPONENT virtual_source_BL = Slit(
|
||||
AT (over_illumination, 0, 0.5*sample_length) RELATIVE arm_virtual_source
|
||||
|
||||
|
||||
/******* Start of scatter logger. Logging scatterings and absorption in the guide system. *********/
|
||||
COMPONENT log_P_start=Shielding_logger()
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
EXTEND
|
||||
%{
|
||||
#ifdef scatter_logger_stop
|
||||
#undef scatter_logger_stop
|
||||
#endif
|
||||
#define scatter_logger_stop log_P_start
|
||||
%}
|
||||
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
* Geometry of Selene guide separate *
|
||||
*************************************/
|
||||
@@ -276,156 +262,6 @@ EXTEND
|
||||
|
||||
%include "Estia_selene2.instr"
|
||||
|
||||
|
||||
|
||||
COMPONENT Lambda_EndGuide = L_monitor(
|
||||
nL = 1000, filename = "Lambda_EndGuide", Lmin=0.5, Lmax=100,
|
||||
restore_neutron = 1)
|
||||
AT (0, 0, -slit_distance-0.01) RELATIVE arm_sample_beam
|
||||
|
||||
|
||||
|
||||
/*Stop of scatter logger. Record scatterings in what is between start and stop, that is, parabolic feeder. */
|
||||
COMPONENT log_P_stop=Shielding_logger_stop(logger=log_P_start)
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
|
||||
|
||||
/**IIIIIIIIIIIIIIIIIII ITERATOR SECTION. PROCESSING STORED EVENTS IIIIIIIIIIIIIIII***/
|
||||
/* Insert this into McStas instrument file to do the costs evaluation */
|
||||
COMPONENT arm_iter_P1_start=Arm()
|
||||
AT(0,0,0) RELATIVE moderator
|
||||
|
||||
COMPONENT iter_P1_start = Shielding_log_iterator_Ni_new()
|
||||
AT (0,0,0) RELATIVE moderator //ABSOLUTE
|
||||
EXTEND
|
||||
%{
|
||||
#ifdef scatter_iterator_stop
|
||||
#undef scatter_iterator_stop
|
||||
#endif
|
||||
#define scatter_iterator_stop iter_P1_start
|
||||
%}
|
||||
JUMP arm_iter_P1_stop WHEN(optics_not_hit)
|
||||
|
||||
/*Monitoring the tracks stored by the scatter logger*/
|
||||
/*Putting dummy arm to register all neutrons to ensure that monitors_nD with shape "previous" will process them */
|
||||
COMPONENT arm_iter_P1_dummy=Arm ()
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
|
||||
COMPONENT mndP01=Monitor_nD (
|
||||
restore_neutron=1, zmin=0.0,
|
||||
zmax=35.0,
|
||||
bins=350, options="previous no slit z ", filename="NiCapture.dat")
|
||||
AT(0,0,0) RELATIVE moderator //RELATIVE source
|
||||
|
||||
COMPONENT arm_iter_P1_stop=Arm()
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
|
||||
COMPONENT iter_P1_stop = Shielding_log_iterator_stop(iterator=iter_P1_start)
|
||||
AT(0,0,0) RELATIVE moderator
|
||||
|
||||
/*Moving again to the reference point of iterator start
|
||||
when there are still some tracks stored to perform iterations with,
|
||||
checked by the function MC_GETPAR */
|
||||
COMPONENT a11i = Arm()
|
||||
AT (0,0,0) RELATIVE Lambda_EndGuide
|
||||
JUMP arm_iter_P1_start WHEN(MC_GETPAR(iter_P1_stop,loop))
|
||||
|
||||
/*IIIIIIIIIIIIIIIIIIII END OF PROCESSING. END OF ITERATOR SECTION IIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**IIIIIIIIIIIIIIIIIII ITERATOR SECTION2. PROCESSING STORED EVENTS IIIIIIIIIIIIIIII***/
|
||||
/* Insert this into McStas instrument file to do the costs evaluation */
|
||||
COMPONENT arm_iter_P2_start=Arm()
|
||||
AT(0,0,0) RELATIVE moderator
|
||||
|
||||
COMPONENT iter_P2_start = Shielding_log_iterator_Ti_new()
|
||||
AT (0,0,0) RELATIVE moderator //ABSOLUTE
|
||||
EXTEND
|
||||
%{
|
||||
#ifdef scatter_iterator_stop
|
||||
#undef scatter_iterator_stop
|
||||
#endif
|
||||
#define scatter_iterator_stop iter_P2_start
|
||||
%}
|
||||
JUMP arm_iter_P2_stop WHEN(optics_not_hit)
|
||||
|
||||
/*Monitoring the tracks stored by the scatter logger*/
|
||||
/*Putting dummy arm to register all neutrons to ensure that monitors_nD with shape "previous" will process them */
|
||||
COMPONENT arm_iter_P2_dummy=Arm ()
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
|
||||
COMPONENT mndP02=Monitor_nD (
|
||||
restore_neutron=1, zmin=0.0,
|
||||
zmax=35.0,
|
||||
bins=350, options="previous no slit z ", filename="TiCapture.dat")
|
||||
AT(0,0,0) RELATIVE moderator //RELATIVE source
|
||||
|
||||
COMPONENT arm_iter_P2_stop=Arm()
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
|
||||
COMPONENT iter_P2_stop = Shielding_log_iterator_stop(iterator=iter_P2_start)
|
||||
AT(0,0,0) RELATIVE moderator
|
||||
|
||||
/*Moving again to the reference point of iterator start
|
||||
when there are still some tracks stored to perform iterations with,
|
||||
checked by the function MC_GETPAR */
|
||||
COMPONENT a12i = Arm()
|
||||
AT (0,0,0) RELATIVE Lambda_EndGuide
|
||||
JUMP arm_iter_P2_start WHEN(MC_GETPAR(iter_P2_stop,loop))
|
||||
|
||||
/*IIIIIIIIIIIIIIIIIIII END OF PROCESSING. END OF ITERATOR2 SECTION IIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
|
||||
|
||||
/**IIIIIIIIIIIIIIIIIII ITERATOR SECTION3. PROCESSING STORED EVENTS IIIIIIIIIIIIIIII***/
|
||||
/* Insert this into McStas instrument file to do the costs evaluation */
|
||||
COMPONENT arm_iter_P3_start=Arm()
|
||||
AT(0,0,0) RELATIVE moderator
|
||||
|
||||
COMPONENT iter_P3_start = Shielding_log_iterator_total()
|
||||
AT (0,0,0) RELATIVE moderator //ABSOLUTE
|
||||
EXTEND
|
||||
%{
|
||||
#ifdef scatter_iterator_stop
|
||||
#undef scatter_iterator_stop
|
||||
#endif
|
||||
#define scatter_iterator_stop iter_P3_start
|
||||
%}
|
||||
JUMP arm_iter_P3_stop WHEN(optics_not_hit)
|
||||
|
||||
/*Monitoring the tracks stored by the scatter logger*/
|
||||
/*Putting dummy arm to register all neutrons to ensure that monitors_nD with shape "previous" will process them */
|
||||
COMPONENT arm_iter_P3_dummy=Arm ()
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
|
||||
COMPONENT mndP03=Monitor_nD (
|
||||
restore_neutron=1, zmin=0.0,
|
||||
zmax=35.0,
|
||||
bins=350, options="previous no slit z ", filename="TotalCapture.dat")
|
||||
AT(0,0,0) RELATIVE moderator //RELATIVE source
|
||||
|
||||
COMPONENT arm_iter_P3_stop=Arm()
|
||||
AT (0,0,0) RELATIVE PREVIOUS
|
||||
|
||||
COMPONENT iter_P3_stop = Shielding_log_iterator_stop(iterator=iter_P3_start, last=1)
|
||||
AT(0,0,0) RELATIVE moderator
|
||||
|
||||
/*Moving again to the reference point of iterator start
|
||||
when there are still some tracks stored to perform iterations with,
|
||||
checked by the function MC_GETPAR */
|
||||
COMPONENT a13i = Arm()
|
||||
AT (0,0,0) RELATIVE Lambda_EndGuide
|
||||
JUMP arm_iter_P3_start WHEN(MC_GETPAR(iter_P3_stop,loop))
|
||||
|
||||
/*IIIIIIIIIIIIIIIIIIII END OF PROCESSING. END OF ITERATOR3 SECTION IIIIIIIIIIIIIIIIIIIIIIIIIIIII*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**********************************
|
||||
* Optical components within cave *
|
||||
**********************************/
|
||||
@@ -519,12 +355,12 @@ COMPONENT analyzer2 = Polariser(nIncRefr=1, d_substrate = 5e-4, reflect_d=0, ref
|
||||
ROTATED (0,0,0.0) RELATIVE arm_analyzer
|
||||
|
||||
/* detector */
|
||||
// COMPONENT tof_detector = Monitor_nD(
|
||||
// filename = "tof_detector",
|
||||
// options = "x limits=[-0.25 0.25] bins=1000 y limits=[-0.5 0.5] bins=1000 time limits=[0 0.6] bins=6000 lambda limits=[0 35] bins=3500 sx limits=[-1 1] bins=1000 sy limits=[-1 1] bins=1000, list all",
|
||||
// xwidth = 0.5, yheight = 1.0)
|
||||
// WHEN sample!=4
|
||||
// AT (0, 0, detector_arm+0.00001) RELATIVE arm_detector
|
||||
COMPONENT tof_detector = Monitor_nD(
|
||||
filename = "tof_detector",
|
||||
options = "x limits=[-0.25 0.25] bins=1000 y limits=[-0.5 0.5] bins=1000 time limits=[0 0.6] bins=6000 lambda limits=[0 35] bins=3500 sx limits=[-1 1] bins=1000 sy limits=[-1 1] bins=1000, list all",
|
||||
xwidth = 0.5, yheight = 1.0)
|
||||
WHEN sample!=4
|
||||
AT (0, 0, detector_arm+0.00001) RELATIVE arm_detector
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ COMPONENT E02_01_012_wedge = AbsorberFixed(xmin=-0.1, xmax=0.0,
|
||||
%}
|
||||
|
||||
/* Insert part of the feeder before the monolith exit window*/
|
||||
COMPONENT E02_01_01 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_01_01 = Elliptic_guide_gravity(
|
||||
l=E02_01_01_length-NBOA_gap, dimensionsAt = "mid",
|
||||
linyh = E02_01_01_start, loutyh= NBOA_c*2-E02_01_01_start-E02_01_01_length,
|
||||
linxw = E02_01_01_start, loutxw= NBOA_c*2-E02_01_01_start-E02_01_01_length,
|
||||
@@ -229,7 +229,7 @@ COMPONENT E02_01_022_wedge = AbsorberFixed(xmin=-0.1, xmax=0.0,
|
||||
PROP_Z0;
|
||||
%}
|
||||
|
||||
COMPONENT E02_01_02 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_01_02 = Elliptic_guide_gravity(
|
||||
l=E02_01_02_length-NBOA_gap, dimensionsAt = "mid",
|
||||
linyh = E02_01_02_start, loutyh= NBOA_c*2-E02_01_02_start-E02_01_02_length,
|
||||
linxw = E02_01_02_start, loutxw= NBOA_c*2-E02_01_02_start-E02_01_02_length,
|
||||
@@ -266,7 +266,7 @@ COMPONENT E02_01_033_wedge = AbsorberFixed(xmin=-0.1, xmax=0.0,
|
||||
PROP_Z0;
|
||||
%}
|
||||
|
||||
COMPONENT E02_01_03 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_01_03 = Elliptic_guide_gravity(
|
||||
l=E02_01_03_length, dimensionsAt = "mid",
|
||||
linyh = E02_01_03_start, loutyh= NBOA_c*2-E02_01_03_start-E02_01_03_length,
|
||||
linxw = E02_01_03_start, loutxw= NBOA_c*2-E02_01_03_start-E02_01_03_length,
|
||||
@@ -340,7 +340,7 @@ COMPONENT E02_02_012_wedge = AbsorberFixed(xmin=-0.1, xmax=0.0,
|
||||
PROP_Z0;
|
||||
%}
|
||||
|
||||
COMPONENT E02_02_01 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_02_01 = Elliptic_guide_gravity(
|
||||
l=E02_02_01_length-NFGA_gap, dimensionsAt = "mid",
|
||||
linyh = E02_02_01_start, loutyh= NFGA_c*2-E02_02_01_start-E02_02_01_length,
|
||||
linxw = E02_02_01_start, loutxw= NFGA_c*2-E02_02_01_start-E02_02_01_length,
|
||||
@@ -368,7 +368,7 @@ COMPONENT E02_02_022_wedge = AbsorberFixed(xmin=-0.1, xmax=0.0,
|
||||
PROP_Z0;
|
||||
%}
|
||||
|
||||
COMPONENT E02_02_02 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_02_02 = Elliptic_guide_gravity(
|
||||
l=E02_02_02_length-NFGA_gap, dimensionsAt = "mid",
|
||||
linyh = E02_02_02_start, loutyh= NFGA_c*2-E02_02_02_start-E02_02_02_length,
|
||||
linxw = E02_02_02_start, loutxw= NFGA_c*2-E02_02_02_start-E02_02_02_length,
|
||||
@@ -405,7 +405,7 @@ COMPONENT E02_02_033_wedge = AbsorberFixed(xmin=-0.1, xmax=0.0,
|
||||
PROP_Z0;
|
||||
%}
|
||||
|
||||
COMPONENT E02_02_03 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_02_03 = Elliptic_guide_gravity(
|
||||
l=E02_02_03_length-NFGA_gap, dimensionsAt = "mid",
|
||||
linyh = E02_02_03_start, loutyh= NFGA_c*2-E02_02_03_start-E02_02_03_length,
|
||||
linxw = E02_02_03_start, loutxw= NFGA_c*2-E02_02_03_start-E02_02_03_length,
|
||||
|
||||
@@ -0,0 +1,391 @@
|
||||
/*******************************************************************************
|
||||
* McStas instrument definition URL=http://www.mcstas.org
|
||||
*
|
||||
* Instrument: ESS_reflectometer_Estia
|
||||
*
|
||||
* %Identification
|
||||
* Written by: Artur Glavic (artur.glavic@psi.ch); Jochen Stahn (jochen.stahn@psi.ch); Christine Klauser (christine.klauser@psi.ch)
|
||||
* Date: 01. 03. 2018
|
||||
* Origin: PSI
|
||||
* Release: McStas 2.4.1
|
||||
* Version: 1.0
|
||||
* %INSTRUMENT_SITE: ESS (E02)
|
||||
*
|
||||
* Estia is a vertical sample, focusing reflectometer for small sample
|
||||
*
|
||||
* %Description
|
||||
* The instrument consists of a two part elliptical feeder that focuses onto
|
||||
* a slit mask that defines the sample footprint, called virtual source.
|
||||
* The virtual source is imaged on the sample position with a Selene
|
||||
* type neutron guide (two ellipses).
|
||||
* This version of the instrument, used in the ESS butterfly moderator,
|
||||
* has two vertical Selene guide systems that share the same focal points.
|
||||
* The two guides are only implemented in the feeder as the selene mirrors
|
||||
* are part of the upgrade program.
|
||||
*
|
||||
* %Parameters
|
||||
* omegaa: [deg] incident angle selected by slit
|
||||
* sample: flag to switch between (0) sample D2O surface
|
||||
* (1) reference ( R(q_z) = 1 for all q_z )
|
||||
* (2) Ni-film on silicon
|
||||
* (3) Natural SiO2 on silicon
|
||||
* (4) monitor instead of sample (normal to beam)
|
||||
* sample_length: [m] Size of sample in beam direction
|
||||
* sample_width: [m] Size of sample in perpendicular to beam
|
||||
*
|
||||
* over_illumination: [m] Extra opening of virtual source compared to sample size
|
||||
* theta_resolution: Delta theta / theta
|
||||
*
|
||||
* lambda_start: [A] Beginning of simulated wavelength range
|
||||
* lambda_end: [A] End of simulated wavelength range
|
||||
* reflector: [0/1/2] Direct beam on sample or moved down to use reflector 1 or 2 setup
|
||||
* enable_gravity: [0/1] Use gravity in elliptical guide model.
|
||||
* enable_chopper: [0/1/2/3] Activate chopper component if !=0. Numbers larger than
|
||||
* 1 define the number of pulses per chopper opening.
|
||||
* (pulses skipped=enable_chopper-1)
|
||||
*
|
||||
* %End
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE INSTRUMENT ESS_reflectometer_Estia
|
||||
(int sample = 0, double sample_length = 0.25, double sample_width = 0.1,
|
||||
double omegaa = 0.0, double theta_resolution = 0.04, int reflector = 0,
|
||||
double lambda_min = 3.75, double lambda_start = 3.0, double lambda_end = 12.0,
|
||||
int enable_chopper = 0, int enable_gravity=0, int enable_windows=1,
|
||||
double source_power = 2)
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
/* Geometrical parameters from CAD model of Estia (ESS-0050413)
|
||||
* TCS coordinate and directional rotation first focus point
|
||||
* refered to as focus_moderator_y_rot
|
||||
*/
|
||||
//TCS position of ISCS: (110,-105,137)
|
||||
double iscs_x=0.0199717;
|
||||
double iscs_y=0.0;
|
||||
double iscs_z=0.0547095; // ISCS in McStas coordinates using mod-view-opt.instr
|
||||
double iscs_rot_y=0.4; // ISCS is at TCS-35.6 degree, McStas at -36 degree
|
||||
double iscs_rot_x=0.7; // downward tilt of Estia axis
|
||||
|
||||
double selene1_foot1y =0.0;
|
||||
double selene1_foot2y = 0.0;
|
||||
|
||||
// Selene 1 geometry parameters (optics parameters in Estia_selene1.instr)
|
||||
double selene1_foot1 = 4.20; // distance of first foot to VS focus
|
||||
double selene1_foot2 = 7.00; // distance of second foot to VS focus
|
||||
double selene1_center;
|
||||
double selene1_shift;
|
||||
double selene1_rot;
|
||||
|
||||
// Selene 2
|
||||
|
||||
|
||||
|
||||
/* general instrument geometry parameters */
|
||||
double total_length = 35.0 ; // m distance moderator-sample (2*c_feeder+4*c_Selene)
|
||||
double detector_arm = 4.0 ; // m distance sample-detector
|
||||
|
||||
|
||||
/* chopper parameters */
|
||||
double chopper_diameter = 0.7;
|
||||
double chopper_pos = 10.895; // m distance source-chopper
|
||||
double chopper_phase ; // deg phase between pulse and chopper opening
|
||||
double chopper_open ; // deg of opening angle in the chopper
|
||||
double pulse_zero = 0.00175; // ms intensity weighted average time of emitted neutron pulse
|
||||
double opening_time = 0.0015; // ms time to reach full intensity on detector, used to adjust phase to get full intensity at beginning of selected band
|
||||
double chopper_freq = 14.0 ; // Hz chopper frequency
|
||||
|
||||
double slit_distance = 1.775; //m, distance slit to sample
|
||||
|
||||
/* derived quantities */
|
||||
double selene_theta = 1.25;
|
||||
double velocity_max ; // m/s neutron velocity of lambda_min
|
||||
|
||||
|
||||
double analyzer_max_height = 0.01; // Maximum sample height to be covered by te polarization analyzers
|
||||
double analyzer1_start = 0.65; // Distance to sample to start the first analyzer
|
||||
double analyzer1_length = 1.3; // length of first analyzer
|
||||
double analyzer2_start = 0.7; // Distance to sample to start the first analyzer
|
||||
double analyzer2_length = 1.6; // length of first analyzer
|
||||
double Theta1_analyzer1, Theta1_analyzer2, Theta2_analyzer1, Theta2_analyzer2, dist_ana_vfocus; // quantities calculated out of values above and 1.5 degree covered divergence
|
||||
|
||||
%}
|
||||
|
||||
INITIALIZE
|
||||
%{
|
||||
// chopper coupling together
|
||||
velocity_max= 3.956034E3 / lambda_min; // h/m_n over lambda - ((3.9..e-7m^2/s))/(1e-10m)
|
||||
chopper_phase=360.0*(chopper_pos*chopper_freq/velocity_max+(pulse_zero-opening_time)*chopper_freq);
|
||||
chopper_open = 98.0;
|
||||
|
||||
|
||||
/* print out some calculated parameter for checking purposes */
|
||||
printf(" Chopper phase = %.1f deg\n", chopper_phase);
|
||||
printf(" Chopper open = %.1f deg\n", chopper_open);
|
||||
|
||||
|
||||
dist_ana_vfocus=analyzer_max_height/2.0/tan(1.5*PI/360.0); // the virtual focus point infront of the actual sample focus where the beams furthest out meet
|
||||
|
||||
Theta1_analyzer1=atan((dist_ana_vfocus+analyzer1_start)/dist_ana_vfocus*analyzer_max_height/2.0/analyzer1_start)*180.0/PI;
|
||||
Theta2_analyzer1=atan((dist_ana_vfocus+analyzer1_start+analyzer1_length)/dist_ana_vfocus*analyzer_max_height/2.0/(analyzer1_start+analyzer1_length))*180.0/PI;
|
||||
Theta1_analyzer2=atan((dist_ana_vfocus+analyzer2_start)/dist_ana_vfocus*analyzer_max_height/2.0/analyzer2_start)*180.0/PI;
|
||||
Theta2_analyzer2=atan((dist_ana_vfocus+analyzer2_start+analyzer2_length)/dist_ana_vfocus*analyzer_max_height/2.0/(analyzer2_start+analyzer2_length))*180.0/PI;
|
||||
|
||||
selene1_center=(selene1_foot1+selene1_foot2)/2.;
|
||||
selene1_shift=(selene1_foot1y+selene1_foot2y)/1000.0;
|
||||
selene1_rot=atan((selene1_foot2y-selene1_foot1y)/(selene1_foot2-selene1_foot1)/1000.0)*180.0/PI;
|
||||
printf(" Selene 1 rotation = %.4f deg\n", selene1_rot);
|
||||
printf(" Selene 1 shift = %.1f mm\n", selene1_shift*1e3);
|
||||
|
||||
%}
|
||||
TRACE
|
||||
|
||||
/********************************************************************************
|
||||
* Initial geometry coordinate axes for important components of the simulation. *
|
||||
********************************************************************************/
|
||||
COMPONENT origin = Progress_bar()
|
||||
AT (0,0,0) ABSOLUTE
|
||||
|
||||
/* The ISCS is the instrument coordinate system with directions where y points upwards and z lies on the instrument axes. */
|
||||
COMPONENT ISCS_rot1 = Arm() // position correctly and rotate around z-axis (x points in beam direction)
|
||||
AT (iscs_x,iscs_y,iscs_z) RELATIVE origin
|
||||
ROTATED (0,iscs_rot_y,0) RELATIVE origin
|
||||
COMPONENT ISCS = Arm() // rotate around y-axis (slight downward tilt)
|
||||
AT (0,0,0) RELATIVE ISCS_rot1
|
||||
ROTATED (iscs_rot_x,0,0) RELATIVE ISCS_rot1
|
||||
|
||||
|
||||
/***********************
|
||||
* Instrument Skeleton *
|
||||
***********************/
|
||||
// Axes system parallel to the c-axis of the feeder
|
||||
COMPONENT arm_feeder = Arm()
|
||||
AT (0, 0, 0) RELATIVE ISCS
|
||||
ROTATED (0, 0, 0) RELATIVE ISCS
|
||||
COMPONENT arm_selene1_center = Arm()
|
||||
AT (selene1_shift, 0, 2*NBOA_c+selene1_center) RELATIVE ISCS
|
||||
ROTATED (0, selene1_rot, 0) RELATIVE ISCS
|
||||
// Axes starting at focus of feeder parallel to c-axis of Selene guides
|
||||
COMPONENT arm_selene1 = Arm()
|
||||
AT (0, 0, -selene1_center) RELATIVE arm_selene1_center
|
||||
COMPONENT arm_selene2 = Arm()
|
||||
AT (0, 0, 2*NBOA_c+2*selene_c) RELATIVE ISCS
|
||||
ROTATED (0, 0, 0) RELATIVE ISCS
|
||||
// Axes of the center of usable beam passing through the virtual source
|
||||
COMPONENT arm_virtual_source_beam = Arm()
|
||||
AT (0, 0, 0) RELATIVE arm_selene1
|
||||
ROTATED (0, selene_theta, 0) RELATIVE ISCS
|
||||
// Axes used for the virtual source masks, this depends on the sample angle to achieve the correct footprint
|
||||
COMPONENT arm_virtual_source = Arm()
|
||||
AT (0, 0, 0) RELATIVE arm_virtual_source_beam
|
||||
ROTATED (0, 10.0, 0) RELATIVE arm_virtual_source_beam
|
||||
// Sample position with Axes pointing to the center of the beam
|
||||
COMPONENT arm_sample_beam = Arm()
|
||||
AT (0, 0, 4.0*selene_c) RELATIVE arm_selene1
|
||||
ROTATED (0, selene_theta, 0) RELATIVE ISCS
|
||||
// Sample position with sample angle rotation
|
||||
COMPONENT arm_addon1_beam = Arm()
|
||||
AT (0, 0, 0) RELATIVE arm_sample_beam
|
||||
ROTATED (omegaa-iscs_rot_x, 0, 0) RELATIVE arm_sample_beam
|
||||
COMPONENT arm_addon1 = Arm()
|
||||
AT (0, 0, -0.2) RELATIVE arm_addon1_beam
|
||||
COMPONENT arm_addon2_beam = Arm()
|
||||
AT (0, 0, 0) RELATIVE arm_sample_beam
|
||||
ROTATED (-omegaa-iscs_rot_x, 0, 0) RELATIVE arm_sample_beam
|
||||
COMPONENT arm_addon2 = Arm()
|
||||
AT (0, 0, 0.2) RELATIVE arm_addon2_beam
|
||||
// Sample position with sample angle rotation
|
||||
COMPONENT arm_sample = Arm()
|
||||
AT (0, -0.2*((reflector==1)*0.024439474+(reflector==2)*0.062914667), 0) RELATIVE arm_sample_beam
|
||||
ROTATED (0, 0, 0) RELATIVE arm_sample_beam
|
||||
// Detector arm rotation at sample position
|
||||
COMPONENT arm_detector = Arm()
|
||||
AT (0, 0, 0) RELATIVE arm_sample_beam
|
||||
ROTATED (0, 0, 0) RELATIVE arm_sample_beam
|
||||
|
||||
|
||||
|
||||
/**********
|
||||
* Source *
|
||||
**********/
|
||||
COMPONENT moderator = ESS_butterfly(
|
||||
sector = "E", beamline = 2, yheight = 0.03, cold_frac = 0.9,
|
||||
focus_xw = E02_01_01_Cu_in_xmax-E02_01_01_Cu_in_xmin+0.002,
|
||||
focus_yh = E02_01_01_Cu_in_yheight+0.002,
|
||||
target_index=4, Lmin = lambda_start, Lmax = lambda_end,
|
||||
n_pulses = 1+enable_chopper, acc_power=source_power)
|
||||
AT (0, 0, 0) RELATIVE origin
|
||||
|
||||
|
||||
/***************************************
|
||||
* Geometry of neutron feeder separate *
|
||||
***************************************/
|
||||
%include "Estia_feeder.instr"
|
||||
|
||||
/****************************************************
|
||||
* Beam manipulation area around the virtual source *
|
||||
****************************************************/
|
||||
/* Absorber to reduce beam to needed size an for shielding purposes (CPC1 in CAD model) */
|
||||
COMPONENT CPC1_in = Slit(xwidth=0.0303, yheight=0.0792)
|
||||
AT (0, 0, -0.890) RELATIVE arm_virtual_source_beam
|
||||
|
||||
COMPONENT CPC1_monitor = Slit(xwidth=0.016344, yheight=0.05547)
|
||||
AT (0, 0, -0.3573) RELATIVE arm_virtual_source_beam
|
||||
|
||||
COMPONENT CPC1_out = Slit(xwidth=0.013, yheight=0.038)
|
||||
AT (0, 0, -0.220) RELATIVE arm_virtual_source_beam
|
||||
|
||||
|
||||
/* bandwidth definition chopper */
|
||||
COMPONENT chopper = DiskChopper(radius=chopper_diameter/2.0, yheight=0.02,
|
||||
theta_0=chopper_open, phase=chopper_phase+chopper_open/2.0,
|
||||
nu=chopper_freq, nslit=1)
|
||||
WHEN enable_chopper==1
|
||||
AT (0, 0, chopper_pos-2*NBOA_c) RELATIVE arm_virtual_source_beam
|
||||
|
||||
|
||||
|
||||
/* The actual virtual source mask, two L-shaped absorbers (first top-right) */
|
||||
COMPONENT virtual_source_TR = Slit(
|
||||
xmin = 0.0, xmax = 1.0, ymin = -1.0, ymax = 0.006)
|
||||
WHEN sample!=4
|
||||
AT (0, 0, -0.015) RELATIVE arm_virtual_source
|
||||
|
||||
//
|
||||
/* The actual virtual source mask, two L-shaped absorbers (second bottom-left) */
|
||||
COMPONENT virtual_source_BL = Slit(
|
||||
xmin = -1.0, xmax = 0.0, ymin = -0.006, ymax = 1.0)
|
||||
WHEN sample!=4
|
||||
AT (0, 0, 0.015) RELATIVE arm_virtual_source
|
||||
|
||||
|
||||
/*************************************
|
||||
* Geometry of Selene guide separate *
|
||||
*************************************/
|
||||
%include "Estia_selene1.instr"
|
||||
|
||||
%include "Estia_selene2.instr"
|
||||
|
||||
/**********************************
|
||||
* Optical components within cave *
|
||||
**********************************/
|
||||
COMPONENT ac_slit = Slit(
|
||||
xwidth = 0.2,
|
||||
ymin = slit_distance*tan((PI/180.0)*(omegaa*(1.0-theta_resolution/2.0)-iscs_rot_x)),
|
||||
ymax = slit_distance*tan((PI/180.0)*(omegaa*(1.0+theta_resolution/2.0)-iscs_rot_x)))
|
||||
AT (0, 0, -slit_distance) RELATIVE arm_sample_beam
|
||||
|
||||
/**************************************************
|
||||
* Reflector to increase incident angle on sample *
|
||||
* ************************************************/
|
||||
COMPONENT addon_slit = Slit(
|
||||
xwidth = 0.2, yheight=0.0009*(reflector!=2)+0.0023*(reflector==2))
|
||||
AT (0, 0, -0.0376) RELATIVE arm_addon1
|
||||
|
||||
COMPONENT addon_11 = Mirror(
|
||||
xwidth = sample_width, yheight = 0.075,
|
||||
m = 2, center = 1, transmit = 0
|
||||
)
|
||||
WHEN reflector==1
|
||||
AT (0, 0, 0) RELATIVE arm_addon1
|
||||
ROTATED (-89.3, 0, 0) RELATIVE arm_addon1
|
||||
|
||||
COMPONENT addon_12 = Mirror(
|
||||
xwidth = sample_width, yheight = 0.075,
|
||||
m = 5, center = 1, transmit = 0
|
||||
)
|
||||
WHEN reflector==2
|
||||
AT (0, 0, 0) RELATIVE arm_addon1
|
||||
ROTATED (-88.2, 0, 0) RELATIVE arm_addon1
|
||||
|
||||
|
||||
|
||||
/***************
|
||||
* Sample area *
|
||||
***************/
|
||||
COMPONENT tof_sample = Monitor_nD(
|
||||
filename = "tof_sample",
|
||||
options = "x limits=[-0.025 0.025] bins=1000 y limits=[-0.025 0.025] bins=1000 xdiv limits=[-0.75 0.75] bins=150 ydiv limits=[-2.0 2.0] bins=400 time limits=[0 0.6] bins=6000 lambda limits=[0 35] bins=3500 list all",
|
||||
xwidth=0.05, yheight = 0.05)
|
||||
WHEN sample==4
|
||||
AT (0, 0, 0) RELATIVE arm_sample_beam
|
||||
ROTATED (0, 0, 0) RELATIVE arm_sample_beam
|
||||
|
||||
|
||||
/* NiTi multilayer sample */
|
||||
COMPONENT sample = Mirror(
|
||||
xwidth = sample_width, yheight = sample_length,
|
||||
center = 1, transmit = 0,
|
||||
reflect = "D2O.ref"
|
||||
)
|
||||
WHEN sample==0
|
||||
AT (0, 0, 0) RELATIVE arm_sample
|
||||
ROTATED (90-iscs_rot_x, 0, 0) RELATIVE arm_sample
|
||||
|
||||
/* ideal reflector as reference */
|
||||
COMPONENT reference_sample = Mirror(
|
||||
xwidth = sample_width, yheight = sample_length,
|
||||
center = 1, transmit = 0,
|
||||
R0 = 0.999, alpha = 0.001, m = 50, center = 1, transmit = 0
|
||||
)
|
||||
WHEN sample==1
|
||||
AT (0, 0, 0) RELATIVE arm_sample
|
||||
ROTATED (90-iscs_rot_x, 0, 0) RELATIVE arm_sample
|
||||
|
||||
/* Nickel film on silicon */
|
||||
COMPONENT ni_sample = Mirror(
|
||||
xwidth = sample_width, yheight = sample_length,
|
||||
center = 1, transmit = 0,
|
||||
reflect = "Si-Ni.ref"
|
||||
)
|
||||
WHEN sample==2
|
||||
AT (0, 0, 0) RELATIVE arm_sample
|
||||
ROTATED (90-iscs_rot_x, 0, 0) RELATIVE arm_sample
|
||||
|
||||
/* Silicon with natural oxide */
|
||||
COMPONENT si_sample = Mirror(
|
||||
xwidth = sample_width, yheight = sample_length,
|
||||
center = 1, transmit = 0,
|
||||
reflect = "Si-SiO2.ref"
|
||||
)
|
||||
WHEN sample==3
|
||||
AT (0, 0, 0) RELATIVE arm_sample
|
||||
ROTATED (90-iscs_rot_x, 0, 0) RELATIVE arm_sample
|
||||
|
||||
|
||||
/**************************************************
|
||||
* Reflector to increase incident angle on sample *
|
||||
* ************************************************/
|
||||
COMPONENT addon_21 = Mirror(
|
||||
xwidth = sample_width, yheight = 0.075,
|
||||
m = 2, center = 1, transmit = 0
|
||||
)
|
||||
WHEN reflector==1
|
||||
AT (0, 0, 0) RELATIVE arm_addon2
|
||||
ROTATED (89.3, 0, 0) RELATIVE arm_addon2
|
||||
|
||||
COMPONENT addon_22 = Mirror(
|
||||
xwidth = sample_width, yheight = 0.075,
|
||||
m = 5, center = 1, transmit = 0
|
||||
)
|
||||
WHEN reflector==2
|
||||
AT (0, 0, 0) RELATIVE arm_addon2
|
||||
ROTATED (88.2, 0, 0) RELATIVE arm_addon2
|
||||
|
||||
|
||||
|
||||
/* detector */
|
||||
COMPONENT tof_detector = Monitor_nD(
|
||||
filename = "tof_detector",
|
||||
options = "x limits=[-0.25 0.25] bins=1000 y limits=[-0.5 0.5] bins=1000 time limits=[0 0.6] bins=6000 lambda limits=[0 35] bins=3500 sx limits=[-1 1] bins=1000 sy limits=[-1 1] bins=1000, list all",
|
||||
xwidth = 0.5, yheight = 1.0)
|
||||
WHEN sample!=4
|
||||
AT (0, 0, detector_arm+0.00001) RELATIVE arm_detector
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
FINALLY
|
||||
%{
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -102,7 +102,7 @@ REMOVABLE COMPONENT source = Moderator(radius = 0.001, focus_xw = selene_entry+0
|
||||
/* Absorber to cut direct view beam (Copper in CAD model) */
|
||||
COMPONENT slit_before_selene_guide_1 = Slit(
|
||||
xmin = 0, xmax = selene_entry+0.001,
|
||||
ymin = 0, ymax = selene_entry+0.005)
|
||||
ymin = -selene_entry-0.005, ymax = 0)
|
||||
AT (0, 0, selene_distance-0.01) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT block_before_selene_guide_1 = Absorber(
|
||||
@@ -113,145 +113,145 @@ COMPONENT block_before_selene_guide_1 = Absorber(
|
||||
AT (0, 0, selene_distance-0.0095) RELATIVE arm_selene1
|
||||
|
||||
/* Selene 1 elliptic guide */
|
||||
COMPONENT E02_03_01 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_01 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance, loutyh= selene_distance+14*selene_segment,
|
||||
linxw = selene_distance, loutxw= selene_distance+14*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_01, mtop=scoating_01, mbottom=0,
|
||||
mright=0, mleft=scoating_01, mbottom=scoating_01, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_02 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_02 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+1*selene_segment, loutyh= selene_distance+13*selene_segment,
|
||||
linxw = selene_distance+1*selene_segment, loutxw= selene_distance+13*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_02, mtop=scoating_02, mbottom=0,
|
||||
mright=0, mleft=scoating_02, mbottom=scoating_02, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+1*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_03 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_03 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+2*selene_segment, loutyh= selene_distance+12*selene_segment,
|
||||
linxw = selene_distance+2*selene_segment, loutxw= selene_distance+12*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_03, mtop=scoating_03, mbottom=0,
|
||||
mright=0, mleft=scoating_03, mbottom=scoating_03, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+2*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_04 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_04 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+3*selene_segment, loutyh= selene_distance+11*selene_segment,
|
||||
linxw = selene_distance+3*selene_segment, loutxw= selene_distance+11*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_04, mtop=scoating_04, mbottom=0,
|
||||
mright=0, mleft=scoating_04, mbottom=scoating_04, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+3*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_05 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_05 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+4*selene_segment, loutyh= selene_distance+10*selene_segment,
|
||||
linxw = selene_distance+4*selene_segment, loutxw= selene_distance+10*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_05, mtop=scoating_05, mbottom=0,
|
||||
mright=0, mleft=scoating_05, mbottom=scoating_05, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+4*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_06 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_06 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+5*selene_segment, loutyh= selene_distance+9*selene_segment,
|
||||
linxw = selene_distance+5*selene_segment, loutxw= selene_distance+9*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_06, mtop=scoating_06, mbottom=0,
|
||||
mright=0, mleft=scoating_06, mbottom=scoating_06, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+5*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_07 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_07 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+6*selene_segment, loutyh= selene_distance+8*selene_segment,
|
||||
linxw = selene_distance+6*selene_segment, loutxw= selene_distance+8*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_07, mtop=scoating_07, mbottom=0,
|
||||
mright=0, mleft=scoating_07, mbottom=scoating_07, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+6*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_08 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_08 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+7*selene_segment, loutyh= selene_distance+7*selene_segment,
|
||||
linxw = selene_distance+7*selene_segment, loutxw= selene_distance+7*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_08, mtop=scoating_08, mbottom=0,
|
||||
mright=0, mleft=scoating_08, mbottom=scoating_08, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+7*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_09 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_09 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+8*selene_segment, loutyh= selene_distance+6*selene_segment,
|
||||
linxw = selene_distance+8*selene_segment, loutxw= selene_distance+6*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_09, mtop=scoating_09, mbottom=0,
|
||||
mright=0, mleft=scoating_09, mbottom=scoating_09, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+8*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_10 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_10 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+9*selene_segment, loutyh= selene_distance+5*selene_segment,
|
||||
linxw = selene_distance+9*selene_segment, loutxw= selene_distance+5*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_10, mtop=scoating_10, mbottom=0,
|
||||
mright=0, mleft=scoating_10, mbottom=scoating_10, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+9*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_11 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_11 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+10*selene_segment, loutyh= selene_distance+4*selene_segment,
|
||||
linxw = selene_distance+10*selene_segment, loutxw= selene_distance+4*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_11, mtop=scoating_11, mbottom=0,
|
||||
mright=0, mleft=scoating_11, mbottom=scoating_11, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+10*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_12 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_12 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+11*selene_segment, loutyh= selene_distance+3*selene_segment,
|
||||
linxw = selene_distance+11*selene_segment, loutxw= selene_distance+3*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_12, mtop=scoating_12, mbottom=0,
|
||||
mright=0, mleft=scoating_12, mbottom=scoating_12, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+11*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_13 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_13 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+12*selene_segment, loutyh= selene_distance+2*selene_segment,
|
||||
linxw = selene_distance+12*selene_segment, loutxw= selene_distance+2*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_13, mtop=scoating_13, mbottom=0,
|
||||
mright=0, mleft=scoating_13, mbottom=scoating_13, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+12*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_14 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_14 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+13*selene_segment, loutyh= selene_distance+1*selene_segment,
|
||||
linxw = selene_distance+13*selene_segment, loutxw= selene_distance+1*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_14, mtop=scoating_14, mbottom=0,
|
||||
mright=0, mleft=scoating_14, mbottom=scoating_14, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+13*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT E02_03_15 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_03_15 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+14*selene_segment, loutyh= selene_distance,
|
||||
linxw = selene_distance+14*selene_segment, loutxw= selene_distance,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=0, mleft=scoating_15, mtop=scoating_15, mbottom=0,
|
||||
mright=0, mleft=scoating_15, mbottom=scoating_15, mtop=0,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+14*selene_segment) RELATIVE arm_selene1
|
||||
|
||||
/* Absorber to cut direct view beam (Copper in CAD model) */
|
||||
COMPONENT slit_after_selene_guide_1 = Slit(
|
||||
xmin = 0, xmax = selene_entry+0.005,
|
||||
ymin = 0, ymax = selene_entry+0.01)
|
||||
ymin = -selene_entry-0.005, ymax = 0)
|
||||
AT (0, 0, 2*selene_c-selene_distance+0.001) RELATIVE arm_selene1
|
||||
|
||||
COMPONENT block_after_selene_guide_1 = Absorber(
|
||||
|
||||
@@ -42,7 +42,7 @@ TRACE
|
||||
/* Absorber to cut direct view beam (Bor-Al in CAD model) */
|
||||
COMPONENT slit_before_selene_guide_2 = Slit(
|
||||
xmin = -selene_entry-0.005, xmax=0,
|
||||
ymin = -selene_entry-0.01, ymax = 0)
|
||||
ymin = 0, ymax = selene_entry+0.01)
|
||||
AT (0, 0, selene_distance-0.002) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT block_before_selene_guide_2 = Absorber(
|
||||
@@ -54,145 +54,145 @@ COMPONENT block_before_selene_guide_2 = Absorber(
|
||||
|
||||
|
||||
/* Selene 2 elliptic guide first half */
|
||||
COMPONENT E02_04_01 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_01 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance, loutyh= selene_distance+14*selene_segment,
|
||||
linxw = selene_distance, loutxw= selene_distance+14*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_15, mleft=0, mtop=0, mbottom=scoating_15,
|
||||
mright=scoating_15, mleft=0, mbottom=0, mtop=scoating_15,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_02 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_02 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+1*selene_segment, loutyh= selene_distance+13*selene_segment,
|
||||
linxw = selene_distance+1*selene_segment, loutxw= selene_distance+13*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_14, mleft=0, mtop=0, mbottom=scoating_14,
|
||||
mright=scoating_14, mleft=0, mbottom=0, mtop=scoating_14,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+1*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_03 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_03 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+2*selene_segment, loutyh= selene_distance+12*selene_segment,
|
||||
linxw = selene_distance+2*selene_segment, loutxw= selene_distance+12*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_13, mleft=0, mtop=0, mbottom=scoating_13,
|
||||
mright=scoating_13, mleft=0, mbottom=0, mtop=scoating_13,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+2*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_04 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_04 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+3*selene_segment, loutyh= selene_distance+11*selene_segment,
|
||||
linxw = selene_distance+3*selene_segment, loutxw= selene_distance+11*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_12, mleft=0, mtop=0, mbottom=scoating_12,
|
||||
mright=scoating_12, mleft=0, mbottom=0, mtop=scoating_12,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+3*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_05 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_05 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+4*selene_segment, loutyh= selene_distance+10*selene_segment,
|
||||
linxw = selene_distance+4*selene_segment, loutxw= selene_distance+10*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_11, mleft=0, mtop=0, mbottom=scoating_11,
|
||||
mright=scoating_11, mleft=0, mbottom=0, mtop=scoating_11,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+4*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_06 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_06 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+5*selene_segment, loutyh= selene_distance+9*selene_segment,
|
||||
linxw = selene_distance+5*selene_segment, loutxw= selene_distance+9*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_10, mleft=0, mtop=0, mbottom=scoating_10,
|
||||
mright=scoating_10, mleft=0, mbottom=0, mtop=scoating_10,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+5*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_07 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_07 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+6*selene_segment, loutyh= selene_distance+8*selene_segment,
|
||||
linxw = selene_distance+6*selene_segment, loutxw= selene_distance+8*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_09, mleft=0, mtop=0, mbottom=scoating_09,
|
||||
mright=scoating_09, mleft=0, mbottom=0, mtop=scoating_09,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+6*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_08 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_08 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+7*selene_segment, loutyh= selene_distance+7*selene_segment,
|
||||
linxw = selene_distance+7*selene_segment, loutxw= selene_distance+7*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_08, mleft=0, mtop=0, mbottom=scoating_08,
|
||||
mright=scoating_08, mleft=0, mbottom=0, mtop=scoating_08,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+7*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_09 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_09 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+8*selene_segment, loutyh= selene_distance+6*selene_segment,
|
||||
linxw = selene_distance+8*selene_segment, loutxw= selene_distance+6*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_07, mleft=0, mtop=0, mbottom=scoating_07,
|
||||
mright=scoating_07, mleft=0, mbottom=0, mtop=scoating_07,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+8*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_10 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_10 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+9*selene_segment, loutyh= selene_distance+5*selene_segment,
|
||||
linxw = selene_distance+9*selene_segment, loutxw= selene_distance+5*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_06, mleft=0, mtop=0, mbottom=scoating_06,
|
||||
mright=scoating_06, mleft=0, mbottom=0, mtop=scoating_06,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+9*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_11 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_11 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+10*selene_segment, loutyh= selene_distance+4*selene_segment,
|
||||
linxw = selene_distance+10*selene_segment, loutxw= selene_distance+4*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_05, mleft=0, mtop=0, mbottom=scoating_05,
|
||||
mright=scoating_05, mleft=0, mbottom=0, mtop=scoating_05,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+10*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_12 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_12 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+11*selene_segment, loutyh= selene_distance+3*selene_segment,
|
||||
linxw = selene_distance+11*selene_segment, loutxw= selene_distance+3*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_04, mleft=0, mtop=0, mbottom=scoating_04,
|
||||
mright=scoating_04, mleft=0, mbottom=0, mtop=scoating_04,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+11*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_13 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_13 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+12*selene_segment, loutyh= selene_distance+2*selene_segment,
|
||||
linxw = selene_distance+12*selene_segment, loutxw= selene_distance+2*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_03, mleft=0, mtop=0, mbottom=scoating_03,
|
||||
mright=scoating_03, mleft=0, mbottom=0, mtop=scoating_03,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+12*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_14 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_14 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+13*selene_segment, loutyh= selene_distance+1*selene_segment,
|
||||
linxw = selene_distance+13*selene_segment, loutxw= selene_distance+1*selene_segment,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_02, mleft=0, mtop=0, mbottom=scoating_02,
|
||||
mright=scoating_02, mleft=0, mbottom=0, mtop=scoating_02,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+13*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT E02_04_15 = Elliptic_guide_gravity_custom(
|
||||
COMPONENT E02_04_15 = Elliptic_guide_gravity(
|
||||
l=selene_segment, dimensionsAt = "mid",
|
||||
linyh = selene_distance+14*selene_segment, loutyh= selene_distance,
|
||||
linxw = selene_distance+14*selene_segment, loutxw= selene_distance,
|
||||
xwidth=selene_b*2, yheight=selene_b*2,
|
||||
mright=scoating_01, mleft=0, mtop=0, mbottom=scoating_01,
|
||||
mright=scoating_01, mleft=0, mbottom=0, mtop=scoating_01,
|
||||
enableGravity=enable_gravity)
|
||||
AT (0, 0, selene_distance+14*selene_segment) RELATIVE arm_selene2
|
||||
|
||||
/* Absorber to cut direct view beam (Bor-Al in CAD model) */
|
||||
COMPONENT slit_after_selene_guide_2 = Slit(
|
||||
xmin = -selene_entry-0.001, xmax=0, xmax = 0.0,
|
||||
ymin = -selene_entry-0.005, ymax = 0)
|
||||
ymin = 0, ymax = selene_entry+0.01)
|
||||
AT (0, 0, 2*selene_c-selene_distance+0.001) RELATIVE arm_selene2
|
||||
|
||||
COMPONENT block_after_selene_guide_2 = Absorber(
|
||||
|
||||
@@ -1,949 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Shielding_calculator.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Rodion Kolevatov
|
||||
* Date: August 2018
|
||||
* Version: $Revision: 1.0 $
|
||||
* Release: ---
|
||||
* Origin: IFE
|
||||
*
|
||||
* Calculating lateral shielding thickness required to attenuate dose rate from gammas
|
||||
* arising from coating capture to a level specified by MaxRate.
|
||||
*
|
||||
* %D
|
||||
* Start of the trace-region in which SCATTER events should be logged.
|
||||
* Whenever a SCATTER occurs in components between this one and its counterpart Scatter_logger_stop the neutron state is logged.
|
||||
* The log is kept in memory - but only for one single
|
||||
* numerical neutron at a time, so there should be no real danger of memory overrun.
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
* Allowed dose rate beyond shielding, MaxRate
|
||||
* Names of text files where the coating capture rates are recorded
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Shielding_calculator
|
||||
DEFINITION PARAMETERS ()
|
||||
SETTING PARAMETERS (double MaxRate = 3.0, double Innerspace = 0.3, string NiCaptureFile = "NiCapture.dat",
|
||||
string TiCaptureFile = "TiCapture.dat", string TotalCaptureFile = "TotalCapture.dat", string OutputFile="Shielding.dat")
|
||||
OUTPUT PARAMETERS ()
|
||||
|
||||
SHARE
|
||||
%{
|
||||
#ifndef LIN_INT_ROUTINE
|
||||
#define LIN_INT_ROUTINE 1
|
||||
//Multi-d linear interpolation routine. Array of args, number of args, sizes of args in interpolation grid, argument grid in single line, data in single line
|
||||
double lint (double * args, int Narg, int * sizearg, double * argtable, double * datatable)
|
||||
{
|
||||
if (Narg==1) {
|
||||
// printf ("Narg=1, arg = %g\n", *args);
|
||||
int point=0;
|
||||
if ((*args)<(*argtable) ) return *datatable;
|
||||
else if ((*args)>*(argtable+ *sizearg-1) ) return * (datatable+ *sizearg-1); // if the value is too large return what corresponds to largest point on the grid available
|
||||
else { // now argument is withing the range of values
|
||||
//interval lookup
|
||||
while (*args>*(argtable+point)) point++;
|
||||
//weights
|
||||
double interval = *(argtable + point) - *(argtable+point-1);
|
||||
double weightup = (*args - *(argtable+point-1))/interval;
|
||||
double weightlow =(*(argtable + point) - *args)/interval;
|
||||
return weightup*(*(datatable+point))+weightlow*(*(datatable+point-1));
|
||||
}//arg within range of values
|
||||
}// if Narg==1
|
||||
else if (Narg >1){//if more than one argument
|
||||
//lookup how large is the data (Narg-1)D slice for fixed value of the first argument
|
||||
int slicesize=1;
|
||||
int i,point=0;
|
||||
for ( i=1;i<Narg;i++) slicesize*=sizearg[i];
|
||||
// printf("Narg > 1, slicesize = %d, arggridstart = %g, argument = %g, arggridend = %g\n",slicesize,*argtable,*args, *(argtable+ *sizearg-1) );
|
||||
//search weights for the first argument and get results with one argument less
|
||||
if ((*args)<(*argtable) ) return lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), datatable);
|
||||
// if the value is too low -- return what is on the lower bound
|
||||
else if ((*args)>*(argtable+ *sizearg-1) ) return lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), (datatable+ slicesize*(*sizearg)));
|
||||
// if the value is too large return what corresponds to largest point on the grid available
|
||||
else { // now argument is withing the range of values
|
||||
//interval lookup
|
||||
while (*args>*(argtable+point)) {
|
||||
// printf ("*(argtable+point) = %g\n", *(argtable+point));
|
||||
point++;}
|
||||
//weights
|
||||
double interval = *(argtable + point) - *(argtable+point-1);
|
||||
double weightup =(*args - *(argtable+point-1))/interval;
|
||||
double weightlow =(*(argtable + point) - *args)/interval;
|
||||
return weightup*lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), datatable+point*slicesize )
|
||||
+weightlow*lint(args+1,Narg-1, sizearg+1, argtable+(*sizearg), datatable+(point-1)*slicesize);
|
||||
} // argument within the ragne
|
||||
} //Narg>1
|
||||
};
|
||||
#endif
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
/******Parameters relevant for calculations of the shielding*******/
|
||||
#define stepPb 0.001 // Step for calculations with steel shielding (2mm)
|
||||
#define stepFe 0.001 // Step for calculations with steel shielding (5mm)
|
||||
#define stepbt 0.005 // Step for calculations with concrete shielding. (1cm)
|
||||
#define Rtubing 0.05 //in meters. Vacuum tubing inner radius, used for calculation of combined shielding in Febt case.
|
||||
#define TFe 0.1 // in meters. Thickness of steel vacuum tubing. (Assuming guide model as guide in evacuated steel pipe with wall thickness TFe).
|
||||
#define stepcomb 0.005 // Step for calculation of combined shielding, TFe layer of steel plus concrete. (2.5 cm)
|
||||
|
||||
//*** NEUTRON CONVERSION DATA *****//
|
||||
#ifndef NEUTRON_GAMMA_DATA
|
||||
#define NEUTRON_GAMMA_DATA 1
|
||||
//Photons per capture in NiTi coating
|
||||
double fraction[]={0.003565789, 0.009694611, 0.028838269, 0.149117282, 0.117348519, 0.042269932, 0.386434136, 0.092896131, 0.046767054, 0.032512648, 0.043547581, 0.040537585, 0.510133557, 0.320364465};
|
||||
double energy [] = {0.150,
|
||||
0.200,
|
||||
0.300,
|
||||
0.400,
|
||||
0.500,
|
||||
0.600,
|
||||
0.800,
|
||||
1.,
|
||||
1.50,
|
||||
2.000,
|
||||
3.0,
|
||||
4.0,
|
||||
5.000,
|
||||
6.000,
|
||||
7.0,
|
||||
8.000,
|
||||
9.0,
|
||||
10.000,
|
||||
11.000};
|
||||
int nEgroup= 19;
|
||||
//Spectrum of capture photons from Ni and Ti
|
||||
//Ni gamma capture specrum
|
||||
double fractionNi[]={0.003722,//150
|
||||
0.015513,//200
|
||||
0.048432,//300
|
||||
0.047485,//400
|
||||
0.198059,//500
|
||||
0.002809,//600
|
||||
0.003142,//800
|
||||
0.06579,//1000
|
||||
0.054534,//1500
|
||||
0.028872,//2000
|
||||
0.063882,//3000
|
||||
0.050286,//4000
|
||||
0.035567,//5000
|
||||
0.080326,//6000
|
||||
0.156571,//7000
|
||||
0.130355,//8000
|
||||
0.534153,//9000
|
||||
0.000558,//10000
|
||||
0.000260};//11000
|
||||
|
||||
|
||||
//Ti capture gamma spectrum
|
||||
double fractionTi[]={0.009326, //0.15
|
||||
0.0, //0.2
|
||||
0.001938,//0.3
|
||||
0.302632,//0.4
|
||||
0.000882,//0.5
|
||||
0.000668, //0.6
|
||||
0.000914, //0.8
|
||||
0.023046,//1.0
|
||||
0.947104,//1.5
|
||||
0.232257,//2.0
|
||||
0.086418,//3.0
|
||||
0.162878,//4.0
|
||||
0.11209,//5.0
|
||||
0.013419,//6.0
|
||||
0.0875051, //7.0
|
||||
0.009083,//8.0
|
||||
0.001923, //9.0
|
||||
0.002189,//10.0
|
||||
0.000332};//11.0
|
||||
//double fractionB[]={0.0, 0.0, 0.0, 0.0, 0.93, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,0.0,0.0,0.0};
|
||||
double fractionB[]={0,//0.15
|
||||
0,//0.2
|
||||
0,//0.3
|
||||
2.32983E-06,//0.4
|
||||
0.935769511,//0.5
|
||||
1.94926E-06,//0.6
|
||||
2.22356E-05,//0.8
|
||||
3.29279E-05,//1.0
|
||||
0.000248357,//1.5
|
||||
0.000398671,//2.0
|
||||
0.000410038,//3.0
|
||||
0.001042575,//4.0
|
||||
0.000961964,//5.0
|
||||
8.714E-05,//6.0
|
||||
0.000248803,//7.0
|
||||
0.00017111,//8.0
|
||||
3.9074E-05,//9.0
|
||||
7.28E-07,//10.0
|
||||
6.27e-6};//11.0
|
||||
|
||||
/*
|
||||
//conversion test input
|
||||
double fraction [] = {0.5,0.5};
|
||||
double energy [] = {2.0,2.0};
|
||||
int nEgroup= 2;
|
||||
*/
|
||||
//*** SHIELDING DATA TABLES ****//
|
||||
// Mashkovich set + NIST data for 15 MeV
|
||||
// Linear attenuation for concrete
|
||||
double AttenuationArgsConc[]={0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.25, 1.5, 2.0, 2.75, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 15.0}; // in meV
|
||||
double AttenuationDataConc[]={31.7, 28.5, 24.6, 21.9, 20.0, 18.5, 16.3, 14.6, 13.1, 11.9, 10.3, 8.74, 8.37, 7.34, 6.65, 6.19, 5.61, 5.29, 4.8208}; // in m^-1
|
||||
int AttenuationSizeConc[]={18};
|
||||
// Iron
|
||||
double AttenuationArgsFe[]={0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.25, 1.5, 2.0, 2.75, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 15.0}; // in meV
|
||||
double AttenuationDataFe[]={139., 106., 83.3, 71.7, 64.6, 59.5, 52.0, 46.7, 42.2, 38.1, 33.3, 29.1, 28.4, 26.0, 24.8, 24.0, 23.4, 23.4, 24.3}; //in m^-1
|
||||
int AttenuationSizeFe[]={19};
|
||||
double AttenuationArgsPb[]={0.15, 0.2, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0, 1.25, 1.5, 2.0, 2.75, 3.0, 4.0, 5.0, 6.0, 8.0, 10.0, 15.0}; // in meV
|
||||
double AttenuationDataPb[]={2180., 1070., 425., 244., 170., 133., 95.2, 77.1, 65.8, 57.7, 50.8, 47.6, 46.8, 47.2, 48.1, 49.4, 52.0, 55.0, 64.2}; //in m^-1
|
||||
int AttenuationSizePb[]={19};
|
||||
/*
|
||||
//NIST set
|
||||
//Concrete
|
||||
double AttenuationArgsConc[]={
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.6,
|
||||
0.8,
|
||||
1.,
|
||||
1.25,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
8.,
|
||||
10.,
|
||||
15.};
|
||||
|
||||
double AttenuationDataConc[]={
|
||||
33.028,
|
||||
29.486,
|
||||
25.231,
|
||||
22.5009,
|
||||
20.5045,
|
||||
18.9428,
|
||||
16.6221,
|
||||
14.9385,
|
||||
13.3561,
|
||||
12.1624,
|
||||
10.4811,
|
||||
8.5123,
|
||||
7.3991,
|
||||
6.6884,
|
||||
6.2031,
|
||||
5.5936,
|
||||
5.2394,
|
||||
4.8208};
|
||||
int AttenuationSizeConc[]={18};
|
||||
|
||||
|
||||
|
||||
|
||||
double AttenuationArgsFe[]={
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.6,
|
||||
0.8,
|
||||
1.,
|
||||
1.25,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
8.,
|
||||
10.,
|
||||
15.};
|
||||
|
||||
double AttenuationDataFe[]={
|
||||
1.55E+02,
|
||||
1.15E+02,
|
||||
8.65E+01,
|
||||
7.40E+01,
|
||||
6.63E+01,
|
||||
6.07E+01,
|
||||
5.27E+01,
|
||||
4.72E+01,
|
||||
4.21E+01,
|
||||
3.84E+01,
|
||||
3.36E+01,
|
||||
2.85E+01,
|
||||
2.61E+01,
|
||||
2.48E+01,
|
||||
2.41E+01,
|
||||
2.36E+01,
|
||||
2.36E+01,
|
||||
2.43E+01};
|
||||
int AttenuationSizeFe[]={18};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
double AttenuationArgsPb[]={
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.6,
|
||||
0.8,
|
||||
1.,
|
||||
1.25,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
8.,
|
||||
10.,
|
||||
15.}; // in meV
|
||||
double AttenuationDataPb[]={
|
||||
2.28E+03,
|
||||
1.13E+03,
|
||||
4.57E+02,
|
||||
2.63E+02,
|
||||
1.83E+02,
|
||||
1.42E+02,
|
||||
1.01E+02,
|
||||
8.05E+01,
|
||||
6.66E+01,
|
||||
5.92E+01,
|
||||
5.22E+01,
|
||||
4.80E+01,
|
||||
4.76E+01,
|
||||
4.84E+01,
|
||||
4.98E+01,
|
||||
5.30E+01,
|
||||
5.64E+01,
|
||||
6.42E+01
|
||||
}; //in m^-1
|
||||
int AttenuationSizePb[]={18};
|
||||
*/
|
||||
|
||||
/*
|
||||
//Linear attenuation test input
|
||||
double AttenuationArgs[]={0.15, 10.0}; // in meV
|
||||
double AttenuationData[]={7.0, 7.0 }; // in m^-1
|
||||
int AttenuationSize[]={2};
|
||||
*/
|
||||
|
||||
// Dose buildup factors concrete
|
||||
double BuildupDataConc[]={1., 1.74, 2.26, 2.95, 3.79, 4.51, 5.57, 6.51, 3.18,
|
||||
1., 2.82, 5.13, 11.2, 24.2, 42.7, 87.6, 153., 353.,
|
||||
1., 2.52, 4.66, 10.8, 25.6, 48.2, 107., 198., 497.,
|
||||
1., 2.27, 4.03, 8.97, 20.2, 30.4, 75.6, 131, 292,
|
||||
1., 1.98, 3.24, 6.42, 12.7, 20.7, 37.2, 57.1, 106,
|
||||
1., 1.77, 2.65, 4.61, 7.97, 11.7, 18.6, 26.0, 42.2,
|
||||
1., 1.67, 2.38, 3.84, 6.20, 8.71, 13.1, 17.7, 27.4,
|
||||
1., 1.61, 2.18, 3.37, 5.23, 7.15, 10.5, 13.9, 20.9,
|
||||
1., 1.49, 1.93, 2.80, 4.14, 5.52, 7.86, 10.2, 15.5,
|
||||
1., 1.41, 1.76, 2.45, 3.51, 4.59, 6.43, 8.31, 12.2,
|
||||
1., 1.35, 1.64, 2.22, 3.10, 4.01, 5.57, 7.19, 10.6,
|
||||
1., 1.26, 1.46, 1.86, 2.50, 3.16, 4.34, 5.59, 8.27};
|
||||
|
||||
int BuildupSizeConc[] ={12, //energy
|
||||
9}; // mu d
|
||||
double BuildupArgsConc[]={
|
||||
0.05, 0.15, 0.3, 0.5, 1.0, 2.0, 3.0, 4.0, 6.0, 8.0, 10.0, 15.0 // energy in MeV
|
||||
,
|
||||
0., 1., 2., 4., 7., 10., 15., 20., 30. //mu d
|
||||
};
|
||||
//Dose buildup factors Fe
|
||||
double BuildupDataFe[]={
|
||||
1., 1.5, 2.2, 3.1, 4.1, 4.6, 5.4, 5.9, //0.1
|
||||
1., 2.0, 3.1, 5.3, 8.9, 14., 22., 31., //0.2
|
||||
1., 2.1, 3.3, 6.0, 12., 23., 49., 84., //0.4
|
||||
1., 1.98, 3.09, 5.98, 11.7, 19.2, 35.4, 55.6, //0.5
|
||||
1., 1.87, 2.89, 5.39, 10.2, 16.2, 28.3, 42.7, //1.0
|
||||
1., 1.76, 2.43, 4.13, 7.25, 10.9, 17.6, 25.1, //2.0
|
||||
1., 1.55, 2.15, 3.51, 5.85, 8.51, 13.5, 19.1, //3.0
|
||||
1., 1.45, 1.94, 3.03, 4.91, 7.11, 11.2, 16.0, //4.0
|
||||
1., 1.34, 1.72, 2.58, 4.14, 6.02, 9.89, 14.7, //6.0
|
||||
1., 1.27, 1.56, 2.23, 3.49, 5.07, 8.50, 13.0, //8.0
|
||||
1., 1.20, 1.42, 1.95, 2.99, 4.35, 7.54, 12.4, //9.0
|
||||
1., 1.48, 1.86, 2.72, 4.30 , 6.37, 11.4, 19.1};//15.0
|
||||
int BuildupSizeFe[]={12, // energy
|
||||
8}; // mu d
|
||||
double BuildupArgsFe[]={0.1, 0.2, 0.4, 0.5, 1.0, 2.0, 3.0, 4.0, 6.0, 8.0, 10.0, 15.0, // energy in MeV
|
||||
0., 1., 2., 4., 7., 10., 15., 20.0};
|
||||
|
||||
|
||||
//Dose buildup factors Pb
|
||||
double BuildupDataPb[]={1., 1.01, 1.03, 1.06, 1.15, 1.16, 1.18, 1.19,
|
||||
1., 1.11, 1.17, 1.25, 1.34, 1.41, 1.5, 1.56,
|
||||
1., 1.17, 1.29, 1.46, 1.58, 1.72, 1.89, 2.02,
|
||||
1., 1.24, 1.42, 1.69, 2.00, 2.27, 2.65, 2.73,
|
||||
1., 1.37, 1.69, 2.26, 3.02, 3.74, 4.81, 5.86,
|
||||
1., 1.39, 1.76, 2.51, 3.66, 4.84, 6.87, 9.00,
|
||||
1., 1.34, 1.68, 2.43, 3.75, 5.30, 8.44, 12.3,
|
||||
1., 1.27, 1.56, 2.25, 3.61, 5.44, 9.80, 16.3,
|
||||
1., 1.21, 1.46, 2.08, 3.44, 5.55, 11.7, 23.6,
|
||||
1., 1.18, 1.40, 1.97, 3.34, 5.69, 13.8, 32.7,
|
||||
1., 1.14, 1.30, 1.74, 2.89, 5.07, 14.1, 44.6,
|
||||
1., 1.11, 1.23, 1.58, 2.52, 4.34, 12.5, 39.2};
|
||||
|
||||
int BuildupSizePb[]={12, // energy
|
||||
8}; // mu d
|
||||
double BuildupArgsPb[]={0.15, 0.30, 0.40, 0.5, 1.0, 2.0, 3.0, 4.0, 5.1, 6.0, 8.0, 10.0, // energy in MeV
|
||||
0., 1., 2., 4., 7., 10., 15., 20.0};
|
||||
|
||||
|
||||
|
||||
|
||||
// Flux-to-dose conversion
|
||||
/* //NRB-99?
|
||||
double FtoDArgs[]= {0.15, 0.20, 0.30, 0.40, 0.50, 0.60, 0.80, 1.0, 2.0, 4.0, 6.0, 8.0, 10.0}; // in meV
|
||||
double FtoDData[] = {3600*0.752E-10, 3600*1.00E-10, 3600*1.51E-10, 3600*2.00E-10, 3600*2.47E-10, 3600*2.91E-10, 3600*3.73E-10, 3600*4.48E-10, 3600*7.49E-10, 3600*12.0E-10, 3600*16.0E-10, 3600*19.9E-10, 3600*23.8E-10}; // from phot/s/m2 to mkSv/hr conversion
|
||||
int nFtoDgroups= 13;
|
||||
int FtoDSize[] = {13};
|
||||
*/
|
||||
//ESS
|
||||
double FtoDArgs[]= {
|
||||
0.15,
|
||||
0.2,
|
||||
0.3,
|
||||
0.4,
|
||||
0.5,
|
||||
0.511,
|
||||
0.6,
|
||||
0.662,
|
||||
0.8,
|
||||
1.,
|
||||
1.12,
|
||||
1.33,
|
||||
1.5,
|
||||
2.,
|
||||
3.,
|
||||
4.,
|
||||
5.,
|
||||
6.,
|
||||
6.13,
|
||||
8.,
|
||||
10.,
|
||||
15.}; // in MeV
|
||||
double FtoDData[] = {
|
||||
2.69E-07,
|
||||
3.60E-07,
|
||||
5.44E-07,
|
||||
7.20E-07,
|
||||
8.89E-07,
|
||||
9.07E-07,
|
||||
1.05E-06,
|
||||
1.14E-06,
|
||||
1.34E-06,
|
||||
1.62E-06,
|
||||
1.76E-06,
|
||||
2.01E-06,
|
||||
2.20E-06,
|
||||
2.69E-06,
|
||||
3.51E-06,
|
||||
4.21E-06,
|
||||
4.82E-06,
|
||||
5.40E-06,
|
||||
5.47E-06,
|
||||
6.70E-06,
|
||||
7.92E-06,
|
||||
1.09E-05
|
||||
}; // from phot/s/m2 to mkSv/hr conversion
|
||||
int nFtoDgroups= 22;
|
||||
int FtoDSize[] = {22};
|
||||
|
||||
|
||||
|
||||
// test input flux to dose
|
||||
/*
|
||||
double FtoDArgs[]= {0.15, 10.0}; // in meV
|
||||
double FtoDData[] = {3600*7.0E-10,3600*7.0E-10}; // from phot/s/m2 to mkSv/hr conversion
|
||||
int nFtoDgroups= 2;
|
||||
int FtoDSize[] = {2};
|
||||
*/
|
||||
#endif //end of insertion of datatables.
|
||||
/*** end of insertion to DECLARE section **/
|
||||
%}
|
||||
|
||||
FINALLY
|
||||
%{
|
||||
/**Reading datafiles with capture per bin**/
|
||||
|
||||
#ifdef _WIN32
|
||||
#define separator "\\"
|
||||
#else
|
||||
#define separator "/"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
double d1, d2, d3, d4;
|
||||
int ibin=0,NBINS;
|
||||
char line[1000],line1[1000];
|
||||
char dirname[1000];
|
||||
memset(dirname,0,sizeof(dirname));
|
||||
strcat(strcat(dirname,mcdirname),separator);
|
||||
|
||||
char filename[1000];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
FILE *dataIn;
|
||||
|
||||
memset(filename,0,sizeof(filename));//resetting filename to NULL string
|
||||
strcat(strcat(filename,dirname),NiCaptureFile);
|
||||
|
||||
printf("Shielding calculator:\n Reading file %s\n",filename);
|
||||
|
||||
if( access( filename, R_OK ) != -1 ) {
|
||||
// file exists
|
||||
dataIn=fopen(filename,"r");
|
||||
} else {
|
||||
// file doesn't exist
|
||||
printf("Shielding calculator could not find file\n%s\nexiting.",NiCaptureFile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (dataIn==NULL) {printf("Can't open file\n"); exit(0);};
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4) ibin++;
|
||||
};
|
||||
|
||||
|
||||
NBINS=ibin;
|
||||
|
||||
//printf("Shielding calculator:\n Input file contains %d bins.\n", NBINS);
|
||||
|
||||
double* zhat = malloc(NBINS*sizeof(double));
|
||||
double* Ihat= malloc(NBINS*sizeof(double));
|
||||
double* IhatNi= malloc(NBINS*sizeof(double));
|
||||
double* IhatTi= malloc(NBINS*sizeof(double));
|
||||
rewind(dataIn);
|
||||
ibin=0;
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
zhat[ibin]=d1;
|
||||
IhatNi[ibin]=d2;
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
|
||||
//printf("Shielding calculator:\n Closing file %s...",filename);
|
||||
fclose(dataIn);
|
||||
//printf("done\n");
|
||||
|
||||
memset(filename,0,sizeof(filename));// setting filename to NULL string
|
||||
strcat(strcat(filename,dirname),TiCaptureFile); //setting filename to TiCapture file
|
||||
printf("Shielding calculator:\n Next input: %s\n",filename);
|
||||
|
||||
if( access( filename, R_OK ) != -1 ) {
|
||||
// file exists
|
||||
dataIn=fopen(filename,"r");
|
||||
} else {
|
||||
// file doesn't exist
|
||||
printf("Shielding calculator could not find file\n%s\nexiting.",TiCaptureFile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
ibin=0;
|
||||
if (dataIn==NULL) {printf("Can't open file\n"); exit(0);};
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
if (ibin!=NBINS){printf("Shielding calculator:\nMismatch in number of bins between input files.\nNo shielding calculation performed, exiting\n");
|
||||
exit(0);}
|
||||
|
||||
rewind(dataIn);
|
||||
|
||||
|
||||
//printf("Shielding calculator:\n Reading file %s\n",filename);
|
||||
ibin=0;
|
||||
|
||||
while (fgets(line, 1000,dataIn))
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
zhat[ibin]=d1;
|
||||
IhatTi[ibin]=d2;
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
fclose(dataIn);
|
||||
|
||||
|
||||
memset(filename,0,sizeof(filename));
|
||||
strcat(strcat(filename,dirname),TotalCaptureFile);
|
||||
printf("Shielding calculator:\n Next input: %s\n",filename);
|
||||
|
||||
if( access( filename, R_OK ) != -1 ) {
|
||||
// file exists
|
||||
dataIn=fopen(filename,"r");
|
||||
} else {
|
||||
// file doesn't exist
|
||||
printf("Shielding calculator could not find file\n%s\nexiting.",TotalCaptureFile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
ibin=0;
|
||||
if (dataIn==NULL) {printf("Can't open file\n"); exit(0);};
|
||||
while (fgets(line, 1000,dataIn)!=NULL)
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
if (ibin!=NBINS){printf("Shielding calculator:\nMismatch in number of bins between input files.\nNo shielding calculation performed, exiting\n");
|
||||
exit(0);}
|
||||
|
||||
rewind(dataIn);
|
||||
|
||||
//printf("Shielding calculator:\n Reading file %s\n",filename);
|
||||
ibin=0;
|
||||
while (fgets(line, 1000,dataIn))
|
||||
{
|
||||
if (*line=='#') continue; // ignore comment line
|
||||
if(sscanf(line,"%le %le %le %le",&d1, &d2, &d3, &d4)==4)
|
||||
{
|
||||
zhat[ibin]=d1;
|
||||
Ihat[ibin]=d2;
|
||||
ibin++;
|
||||
};
|
||||
};
|
||||
//printf("Shielding calculator:\n Closing file %s...",filename);
|
||||
fclose(dataIn);
|
||||
//printf("done\n");
|
||||
|
||||
int i,ilayerConc=1,ilayerFe=1,ilayerFeConc=1,ilayerPb=1,iz,iEgroup; // Auxiliary variables
|
||||
|
||||
double zbinlength = zhat[2]-zhat[1];
|
||||
|
||||
|
||||
|
||||
double* RvaluesPb = malloc(NBINS*sizeof(double));
|
||||
double* RvaluesFe= malloc(NBINS*sizeof(double));
|
||||
double* Rvaluesbt= malloc(NBINS*sizeof(double));
|
||||
double* thicknessPb= malloc(NBINS*sizeof(double));
|
||||
double* thicknessFe= malloc(NBINS*sizeof(double));
|
||||
double* thicknessbt= malloc(NBINS*sizeof(double));
|
||||
double* RvaluesFebt= malloc(NBINS*sizeof(double));
|
||||
double* thicknessFebt= malloc(NBINS*sizeof(double));
|
||||
|
||||
double* doseFe= malloc(NBINS*sizeof(double));
|
||||
double* dosebt= malloc(NBINS*sizeof(double));
|
||||
double* doseFebt= malloc(NBINS*sizeof(double));
|
||||
double* dosePb= malloc(NBINS*sizeof(double));
|
||||
|
||||
|
||||
|
||||
|
||||
/* for ( i=0; i< NBINS; i++)
|
||||
{
|
||||
doseFe[i]=0.0; dosebt[i]=0.0;doseFebt[i]=0.0;dosePb[i]=0.0;
|
||||
}
|
||||
*/
|
||||
|
||||
for ( iz=0; iz< NBINS; iz++)
|
||||
{
|
||||
double zc=zhat[iz]; // the z-value for the calculation
|
||||
double z;
|
||||
|
||||
//CONCRETE
|
||||
// ilayerConc may have already some value calculated for an upstream piece.
|
||||
// We start from it and if shielding is too thick, reduce this number.
|
||||
do {
|
||||
double thickbt = (ilayerConc)*stepbt;
|
||||
double Rbt = (0.5*Innerspace) + thickbt;
|
||||
Rvaluesbt[iz]=Rbt;
|
||||
dosebt[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dFemfp, dPbmfp, dBtmfp,dFebtmfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup], fracB=fractionB[iEgroup];
|
||||
dBtmfp=lint(&En,1,AttenuationSizeConc, AttenuationArgsConc, AttenuationDataConc)*(Rbt-(0.5*Innerspace))*sqrt(Rbt*Rbt+z*z)/Rbt;
|
||||
double args[]={En,dBtmfp};
|
||||
dosebt[iz] += (fracNi* IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926*lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dBtmfp)/(Rbt*Rbt+z*z)*
|
||||
lint(args, 2, BuildupSizeConc,BuildupArgsConc,BuildupDataConc);
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerConc--;
|
||||
} while ((dosebt[iz] < MaxRate)&&(ilayerConc>0));
|
||||
|
||||
//increase ilayerConc until the dose rate requirements are satisfied.
|
||||
do {
|
||||
double thickbt = (ilayerConc)*stepbt;
|
||||
double Rbt = (0.5*Innerspace) + thickbt;
|
||||
Rvaluesbt[iz]=Rbt;
|
||||
dosebt[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dFemfp, dPbmfp, dBtmfp,dFebtmfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup], fracB=fractionB[iEgroup];
|
||||
dBtmfp=lint(&En,1,AttenuationSizeConc, AttenuationArgsConc, AttenuationDataConc)*(Rbt-(0.5*Innerspace))*sqrt(Rbt*Rbt+z*z)/Rbt;
|
||||
double args[]={En,dBtmfp};
|
||||
dosebt[iz] += (fracNi* IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926*lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dBtmfp)/(Rbt*Rbt+z*z)*
|
||||
lint(args, 2, BuildupSizeConc,BuildupArgsConc,BuildupDataConc);
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerConc++;
|
||||
} while ((dosebt[iz] >=MaxRate));
|
||||
|
||||
|
||||
|
||||
//CONCRETE+TUBING
|
||||
do{
|
||||
double thickFebt= (ilayerFeConc)*stepcomb;
|
||||
double RFebt=(0.5*Innerspace)+TFe+thickFebt;
|
||||
RvaluesFebt[iz]=RFebt;
|
||||
doseFebt[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dFemfp, dPbmfp, dBtmfp,dFebtmfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup], fracB=fractionB[iEgroup];
|
||||
|
||||
dFebtmfp=(lint(&En,1,AttenuationSizeConc, AttenuationArgsConc, AttenuationDataConc)*thickFebt+
|
||||
lint(&En,1,AttenuationSizeFe, AttenuationArgsFe, AttenuationDataFe)*TFe)
|
||||
*sqrt(RFebt*RFebt+z*z)/RFebt;
|
||||
double args[]={En,dFebtmfp};
|
||||
|
||||
doseFebt[iz]+= (fracNi*IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926*
|
||||
lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dFebtmfp)/(RFebt*RFebt+z*z)*
|
||||
lint(args, 2, BuildupSizeConc,BuildupArgsConc,BuildupDataConc);
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerFeConc--;
|
||||
} while ((doseFebt[iz] < MaxRate)&&(ilayerFeConc>0));
|
||||
|
||||
|
||||
do {
|
||||
double thickFebt= (ilayerFeConc)*stepcomb;
|
||||
double RFebt=(0.5*Innerspace)+TFe+thickFebt;
|
||||
RvaluesFebt[iz]=RFebt;
|
||||
doseFebt[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dFemfp, dPbmfp, dBtmfp,dFebtmfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup], fracB=fractionB[iEgroup];
|
||||
|
||||
dFebtmfp=(lint(&En,1,AttenuationSizeConc, AttenuationArgsConc, AttenuationDataConc)*thickFebt+
|
||||
lint(&En,1,AttenuationSizeFe, AttenuationArgsFe, AttenuationDataFe)*TFe)
|
||||
*sqrt(RFebt*RFebt+z*z)/RFebt;
|
||||
double args[]={En,dFebtmfp};
|
||||
|
||||
doseFebt[iz]+= (fracNi*IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatTi[i]-IhatNi[i])) *0.25/3.1415926*
|
||||
lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dFebtmfp)/(RFebt*RFebt+z*z)*
|
||||
lint(args, 2, BuildupSizeConc,BuildupArgsConc,BuildupDataConc);
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerFeConc++;
|
||||
} while ((doseFebt[iz] >=MaxRate));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//IRON
|
||||
do {
|
||||
double thickFe = (ilayerFe)*stepFe;
|
||||
double RFe = (0.5*Innerspace) + thickFe;
|
||||
RvaluesFe[iz]=RFe;
|
||||
doseFe[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dFemfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup],fracB=fractionB[iEgroup];
|
||||
|
||||
|
||||
dFemfp=lint(&En,1,AttenuationSizeFe, AttenuationArgsFe, AttenuationDataFe)*thickFe*sqrt(RFe*RFe+z*z)/RFe;
|
||||
double args[]={En,dFemfp};
|
||||
doseFe[iz] += (fracNi*IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatNi[i]-IhatTi[i])) *0.25/3.1415926*
|
||||
lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dFemfp)/(RFe*RFe+z*z)*
|
||||
lint(args, 2, BuildupSizeFe,BuildupArgsFe,BuildupDataFe);
|
||||
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerFe--;
|
||||
} while ((doseFe[iz] <MaxRate)&&(ilayerFe>0));
|
||||
|
||||
|
||||
|
||||
do {
|
||||
double thickFe = (ilayerFe)*stepFe;
|
||||
double RFe = (0.5*Innerspace) + thickFe;
|
||||
RvaluesFe[iz]=RFe;
|
||||
doseFe[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dFemfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup],fracB=fractionB[iEgroup];
|
||||
dFemfp=lint(&En,1,AttenuationSizeFe, AttenuationArgsFe, AttenuationDataFe)*(RFe-(0.5*Innerspace))*sqrt(RFe*RFe+z*z)/RFe;
|
||||
double args[]={En,dFemfp};
|
||||
doseFe[iz] += (fracNi*IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatNi[i]-IhatTi[i])) *0.25/3.1415926*
|
||||
lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dFemfp)/(RFe*RFe+z*z)*
|
||||
lint(args, 2, BuildupSizeFe,BuildupArgsFe,BuildupDataFe);
|
||||
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerFe++;
|
||||
} while ((doseFe[iz] >=MaxRate));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//LEAD
|
||||
do {
|
||||
double thickPb = (ilayerPb)*stepPb;
|
||||
double RPb = (0.5*Innerspace) + thickPb;
|
||||
RvaluesPb[iz]=RPb;
|
||||
dosePb[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dPbmfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup],fracB=fractionB[iEgroup];
|
||||
|
||||
dPbmfp=lint(&En,1,AttenuationSizePb, AttenuationArgsPb, AttenuationDataPb)*(RPb-(0.5*Innerspace))*sqrt(RPb*RPb+z*z)/RPb;
|
||||
double args[]={En,dPbmfp};
|
||||
dosePb[iz] += (fracNi*IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatNi[i]-IhatTi[i])) *0.25/3.1415926*
|
||||
lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dPbmfp)/(RPb*RPb+z*z)*
|
||||
lint(args, 2, BuildupSizePb,BuildupArgsPb,BuildupDataPb);
|
||||
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerPb--;
|
||||
} while ((dosePb[iz] <MaxRate)&&(ilayerPb>0));
|
||||
|
||||
|
||||
do {
|
||||
double thickPb = (ilayerPb)*stepPb;
|
||||
double RPb = (0.5*Innerspace) + thickPb;
|
||||
RvaluesPb[iz]=RPb;
|
||||
dosePb[iz]=0.0;
|
||||
/*computing the integral*/
|
||||
double dPbmfp;
|
||||
for (i=0;i<NBINS;i++){
|
||||
z=zc-zhat[i];
|
||||
|
||||
for (iEgroup=0; iEgroup<nEgroup;iEgroup++){
|
||||
double En = energy[iEgroup], fracNi=fractionNi[iEgroup],fracTi=fractionTi[iEgroup],fracB=fractionB[iEgroup];
|
||||
|
||||
dPbmfp=lint(&En,1,AttenuationSizePb, AttenuationArgsPb, AttenuationDataPb)*(RPb-(0.5*Innerspace))*sqrt(RPb*RPb+z*z)/RPb;
|
||||
double args[]={En,dPbmfp};
|
||||
dosePb[iz] += (fracNi*IhatNi[i]+fracTi*IhatTi[i]+fracB*(Ihat[i]-IhatNi[i]-IhatTi[i])) *0.25/3.1415926*
|
||||
lint(&En, 1, FtoDSize, FtoDArgs,FtoDData)* exp(-dPbmfp)/(RPb*RPb+z*z)*
|
||||
lint(args, 2, BuildupSizePb,BuildupArgsPb,BuildupDataPb);
|
||||
|
||||
} /* summing energy groups */
|
||||
} /* calculation of integral i=0...NBINS */
|
||||
ilayerPb++;
|
||||
} while ((dosePb[iz] >=MaxRate));
|
||||
|
||||
|
||||
} /* Position scan iz */
|
||||
|
||||
/* Selection of appropriate radius for the gamma shielding */
|
||||
for ( i=0; i< NBINS; i++)
|
||||
{
|
||||
int index=0;
|
||||
thicknessFe[i]=RvaluesFe[i]-(0.5*Innerspace);
|
||||
thicknessbt[i]=Rvaluesbt[i]-(0.5*Innerspace);
|
||||
thicknessPb[i]=RvaluesPb[i]-(0.5*Innerspace);
|
||||
thicknessFebt[i]=RvaluesFebt[i]-(0.5*Innerspace)-TFe;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define separator "\\"
|
||||
#else
|
||||
#define separator "/"
|
||||
#endif
|
||||
|
||||
FILE *cost_out;
|
||||
memset(filename,0,sizeof(filename));
|
||||
strcat(strcat(filename,dirname),OutputFile);
|
||||
printf("Shielding calculator:\nWriting to file %s\n",filename);
|
||||
cost_out=fopen(filename,"w");
|
||||
|
||||
|
||||
fprintf(cost_out,"#Required shielding dimensions for the dose rate not to exceed %g uSv/hr at the surface with shielding inner dimensions %g meters\n#Position z,m\tNeutrons Ihat(z),n/s/bin\tNeutrons I(z),n/s/m\tCaptured by Ni /s/bin \tCapturedby Ni /s/m\tCaptured by Ti /s/bin\tCaptured by Ti /s/m\tThickness Pb, m\tThickness Fe, m\tThickness concrete, m (no tubing)\tThickness concrete, m (steel tubing %g cm)\tOuter radius Pb,m\tOuter radius Fe,m\tOuter radius concrete, m\tOuter radius concrete,m (with tubing)\n",MaxRate,Innerspace,100*TFe);
|
||||
|
||||
|
||||
for ( i=0; i< NBINS; i++)
|
||||
{
|
||||
fprintf( cost_out,"%g\t%.4g\t%.4g\t%.4g\t%.4g\t%.4g\t%.4g\t%g\t%g\t%g\t%g\t%g\t%g\t%g\t%g\n",zhat[i],Ihat[i], Ihat[i]/zbinlength, IhatNi[i], IhatNi[i]/zbinlength, IhatTi[i],IhatTi[i]/zbinlength,thicknessPb[i], thicknessFe[i],thicknessbt[i],thicknessFebt[i], RvaluesPb[i],RvaluesFe[i],Rvaluesbt[i],RvaluesFebt[i]);
|
||||
}
|
||||
fclose(cost_out);
|
||||
free(zhat); free(Ihat); free(IhatNi); free(IhatTi);
|
||||
free(RvaluesPb);
|
||||
free(RvaluesFe);
|
||||
free(Rvaluesbt);
|
||||
free(thicknessPb);
|
||||
free(thicknessFe);
|
||||
free(thicknessbt);
|
||||
free(RvaluesFebt);
|
||||
free(thicknessFebt);
|
||||
|
||||
free(doseFe);
|
||||
free(dosebt);
|
||||
free(doseFebt);
|
||||
free(dosePb);
|
||||
|
||||
printf("Done with writing shielding\n");
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -1,210 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Scatter_log_iterator.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Erik B Knudsen
|
||||
* Updated by: Rodon Kolevatov
|
||||
* Date: November 2012
|
||||
* Version: $Revision: 1.21 $
|
||||
* Release: McStas 2.1
|
||||
* Origin: DTU Physics
|
||||
*
|
||||
* Iteration element for a Scatter_log
|
||||
*
|
||||
* %D
|
||||
*
|
||||
* This component marks the beginning of the region in trace in which pseudo-neutrons
|
||||
* are to be propagated. Pseudo-neutrons are neutrons which are generated by the function
|
||||
* <i>compute_func</i> from before and after SCATTER neutron states which have been logged by
|
||||
* a set of Scatter_logger/Scatter_logger_stop components.
|
||||
* N.B. This component should be immediately preceeded by an Arm. Any components between this one
|
||||
* and a subsequent Scatter_log_iterator_stop-component will be visited by the set of pseudo-neutrons
|
||||
* as if they were regular neutrons in the classical McStas-manner.
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
*
|
||||
* compute_func [ ] : Address of the function that computes a psuedo neutron from before and after scatter states.
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Shielding_log_iterator_Ni_new
|
||||
DEFINITION PARAMETERS (compute_func=NULL)
|
||||
SETTING PARAMETERS ()
|
||||
OUTPUT PARAMETERS (nstate_initial,s0,s1)
|
||||
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
|
||||
|
||||
SHARE
|
||||
%{
|
||||
#ifndef M1THICKNESS
|
||||
#define M1THICKNESS 1500.0 //thickness of the m=1 coating
|
||||
#endif
|
||||
/*This is the specialized pseudo-neutron function that computes
|
||||
an escaping neutron from logged before and after SCATTER neutron states
|
||||
with weight corresponding to capture in the Nickel layers*/
|
||||
int exit_neutron_Ni(double *ns_tilde, struct Generalized_State_t *S0, struct Generalized_State_t *S1){
|
||||
/*!!Note that the transformation into global coordinate system must be done while logging
|
||||
as we do not have access to neither the component name nor can get the component rotation by index.*/
|
||||
Coords c1,c2;
|
||||
Rotation R1,R2;
|
||||
|
||||
/*so now compute the pseudo neutron state and possibly user variables*/
|
||||
/*momentum transfer at reflection. ASSUMES NO GRAVITY???*/
|
||||
double velocity=sqrt((S1->_vx)*(S1->_vx)+(S1->_vy)*(S1->_vy)+(S1->_vz)*(S1->_vz));
|
||||
double qtransf = V2Q*sqrt((S1->_vx-S0->_vx)*(S1->_vx-S0->_vx)+(S1->_vy-S0->_vy)*(S1->_vy-S0->_vy)+(S1->_vz-S0->_vz)*(S1->_vz-S0->_vz));
|
||||
double qinm = qtransf/0.0218;
|
||||
/*position comes from "new" state*/
|
||||
ns_tilde[0]=S1->_x;ns_tilde[1]=S1->_y;ns_tilde[2]=S1->_z;
|
||||
/*velocity is the "old" state*/
|
||||
ns_tilde[3]=S0->_vx;ns_tilde[4]=S0->_vy;ns_tilde[5]=S0->_vz;
|
||||
/*time from new*/
|
||||
ns_tilde[6]=S1->_t;
|
||||
/*spin comes from "new" state*/
|
||||
ns_tilde[7]=S1->_sx;ns_tilde[8]=S1->_sy;ns_tilde[9]=S1->_sz;
|
||||
/*weight of capture in Ni is determined analytically*/
|
||||
double captureprob;
|
||||
if ((S1->_mvalue<0)||(qinm<0.0001)) {ns_tilde[10]=0.0; captureprob=0.0;}
|
||||
else if (qinm<=1.01){
|
||||
/*q<qc(Ni), loss due to diffusion beyond the coating cutoff*/
|
||||
/* captureprob = 4.0582E-09*2200.0/velocity/((0.085787L*18.5 + 0.008321L*5.7)*1.0E-08+4.0582E-09*2200.0/velocity)*(S0->_p-S1->_p)/S0->_p; */
|
||||
double sigmadif ;//diffuse scattering cross section
|
||||
if (velocity > 1950.0){ sigmadif = 18.5; //lambda < 2A, totally incoherent scattering
|
||||
} else if (velocity < 1300.0){sigmadif = 5.2; // lambda >3A, totally coherent regime, only incoherent part contributes
|
||||
} else sigmadif=5.2+13.3*(1950-velocity)/(1950.0-1300.0);
|
||||
/*Now checking if the coating is m=1 or has higher m*/
|
||||
|
||||
if(S1->_mvalue<1.05) /*m=1 coating=> "triple thickness approximation" with Im k determined for reflectivity dip*/
|
||||
{
|
||||
double imk; /*imaginary part of momentum in the layer*/
|
||||
imk=1.e-8*(sigmadif*0.09121+0.41*2200.0/velocity)*velocity/3956.0*M1THICKNESS; /*v(m/s)x\lambda(AA)=3956*/
|
||||
captureprob = 4.49*2200.0/velocity/(sigmadif+4.49*2200.0/velocity)*(S0->_p-S1->_p)*(1-exp(-2.0*imk*M1THICKNESS*3.0))/S0->_p;
|
||||
} else { // reflection loss below qcNi in case of multilayer.
|
||||
/*Taking the minimum of what is for m=1 coating and what is when assume that neutron is physically lost beyond the cutoff.*/
|
||||
double imk; /*imaginary part of momentum in the layer*/
|
||||
imk=1.e-8*(sigmadif*0.09121+0.41*2200.0/velocity)*velocity/3956.0*M1THICKNESS; /*v(m/s)x\lambda(AA)=3956*/
|
||||
double c1, c2;
|
||||
c1 = 4.49*2200.0/velocity/(sigmadif+4.49*2200.0/velocity)*(S0->_p-S1->_p)*(1-exp(-2.0*imk*M1THICKNESS*3.0))/S0->_p;
|
||||
c2 = 0.005*(S1->_mvalue+0.1)*(S0->_p-S1->_p)/S0->_p; // for the matters of conservative estimate might be divided by 1-R at mvalue+0.1.
|
||||
captureprob = (c1>c2) ? c1 : c2 ;
|
||||
}
|
||||
} //end of "if (qinm<=1.02)"
|
||||
else if (qinm<=S1->_mvalue+0.1) { /*q>q_c(Ni) and reflection, absorption per hit */
|
||||
captureprob=0.005*qinm;
|
||||
} else { /* transmission beyond smirrorcutoff, some reserve for m=1 coating*/
|
||||
if(S1->_mvalue<1.05) captureprob=0.0025*1.3*1.3/qinm;
|
||||
else captureprob=0.0025*(S1->_mvalue+0.1)*(S1->_mvalue+0.1)/qinm;}
|
||||
/*check change in weight*/
|
||||
if((S0->_p-S1->_p)>1.e-5*S0->_p) ns_tilde[10]=S0->_p*captureprob; else ns_tilde[10]=0.0;
|
||||
/* if "mvalue" is -1, then absorption happened not on the coating but somewhere else. The weight of capture in nickel should be set to zero.*/
|
||||
|
||||
if(ns_tilde[10]>(S0->_p-S1->_p)) { printf("%f\t%f\t%f\t%E\t%E\t%f\t%E\n",velocity, qinm, S1->_mvalue, S0->_p, S1->_p, captureprob, ns_tilde[10]); exit(0);}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define NOABS \
|
||||
do {/* Nothing*/} while(0)
|
||||
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
int (*pseudo_neutron_state_function_Ni) (double *, struct Generalized_State_t *, struct Generalized_State_t *);
|
||||
|
||||
struct Generalized_State_t *s1,*s0;
|
||||
|
||||
double *nstate_initial;
|
||||
|
||||
int optics_not_hit;
|
||||
|
||||
/*need a pointer to the structure set up by the logger*/
|
||||
%}
|
||||
|
||||
INITIALIZE
|
||||
%{
|
||||
if (compute_func) {
|
||||
pseudo_neutron_state_function_Ni=compute_func;
|
||||
}else{
|
||||
pseudo_neutron_state_function_Ni=exit_neutron_Ni;
|
||||
}
|
||||
nstate_initial=NULL;
|
||||
|
||||
optics_not_hit=0;
|
||||
|
||||
|
||||
%}
|
||||
|
||||
|
||||
TRACE
|
||||
%{
|
||||
|
||||
//printf("Entering Iterator_Ni\n");
|
||||
/*I am the start of the pseudo neutron iterator*/
|
||||
if (nstate_initial==NULL){
|
||||
optics_not_hit=0; /* Fresh start, resetting variable */
|
||||
double *ns=nstate_initial=calloc(11,sizeof(double));
|
||||
ns[0]=x;ns[1]=y; ns[2]=z;
|
||||
ns[3]=vx;ns[4]=vy;ns[5]=vz;
|
||||
ns[6]=t;
|
||||
ns[7]=sx;ns[8]=sy;ns[9]=sz;
|
||||
ns[10]=p;
|
||||
|
||||
s0=Bounce_store;
|
||||
s1=Bounce_store+1;
|
||||
/* Remove std. ABSORB to avoid breaking analysis loop */
|
||||
#undef mcabsorb
|
||||
#define mcabsorb scatter_iterator_stop
|
||||
|
||||
|
||||
}
|
||||
|
||||
//if (s1->_p!=-1){
|
||||
if (s1->_p!=-1 && s1->_p!=-2){
|
||||
/*a neutron weight of -1 is nonsensical. I.e. if s1->p>=0, it means there are two states in the log from which we can compute a pseudo-neutron*/
|
||||
double nstate[11];
|
||||
if ( pseudo_neutron_state_function_Ni(nstate,s0,s1) ){
|
||||
printf("Warning: (%s): error reported when computing pseudo neutron\n",NAME_CURRENT_COMP);
|
||||
}
|
||||
/*set neutron state for subsequent components*/
|
||||
x=nstate[0];y=nstate[1];z=nstate[2];
|
||||
vx=nstate[3];vy=nstate[4];vz=nstate[5];
|
||||
t=nstate[6];
|
||||
sx=nstate[7];sy=nstate[8];sz=nstate[9];
|
||||
p=nstate[10];
|
||||
s0++;
|
||||
s1++;
|
||||
// printf("Ni: z=%g\tp=%g\n",z,p);
|
||||
}else if (Bounce_store[1]._p==-1){
|
||||
/*This can happen now only in the case optics was not hit, i.e. no reflection, no absorption*/
|
||||
x=s0->_x;y=s0->_y;z=s0->_z;
|
||||
vx=s0->_vx;vy=s0->_vy;vz=s0->_vz;
|
||||
t=s0->_t;
|
||||
sx=s0->_sx;sy=s0->_sy;sz=s0->_sz;
|
||||
p=s0->_p;
|
||||
optics_not_hit = 1;
|
||||
// fprintf(stdout,"No interactions with optics. Use \"optics_not_hit\" variable to JUMP at scatter_logger_stop and avoid sending to ScatterLogIterator those neutrons which were actually not scattered.\n");
|
||||
} else {
|
||||
printf("Here happens what should not happen: s1->_p=%g, Bounce_store[1]._p=%g\n",s1->_p,Bounce_store[1]._p);
|
||||
fprintf(stderr,"This should not happen. Period.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
MCDISPLAY
|
||||
%{
|
||||
/* A bit ugly; hard-coded dimensions. */
|
||||
magnify("");
|
||||
line(0,0,0,0.2,0,0);
|
||||
line(0,0,0,0,0.2,0);
|
||||
line(0,0,0,0,0,0.2);
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -1,186 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Scatter_log_iterator.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Erik B Knudsen
|
||||
* Date: November 2012
|
||||
* Version: $Revision: 1.21 $
|
||||
* Release: McStas 2.1
|
||||
* Origin: DTU Physics
|
||||
*
|
||||
* Iteration element for a Scatter_log
|
||||
*
|
||||
* %D
|
||||
*
|
||||
* This component marks the beginning of the region in trace in which pseudo-neutrons
|
||||
* are to be propagated. Pseudo-neutrons are neutrons which are generated by the function
|
||||
* <i>compute_func</i> from before and after SCATTER neutron states which have been logged by
|
||||
* a set of Scatter_logger/Scatter_logger_stop components.
|
||||
* N.B. This component should be immediately preceeded by an Arm. Any components between this one
|
||||
* and a subsequent Scatter_log_iterator_stop-component will be visited by the set of pseudo-neutrons
|
||||
* as if they were regular neutrons in the classical McStas-manner.
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
*
|
||||
* compute_func [ ] : Address of the function that computes a psuedo neutron from before and after scatter states.
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Shielding_log_iterator_Ti_new
|
||||
DEFINITION PARAMETERS (compute_func=NULL)
|
||||
SETTING PARAMETERS ()
|
||||
OUTPUT PARAMETERS (nstate_initial,s0,s1)
|
||||
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
|
||||
|
||||
SHARE
|
||||
%{
|
||||
/*This is the specialized pseudo-neutron function that computes
|
||||
an escaping neutron from logged before and after SCATTER neutron states
|
||||
with weights corresponding to capture in Ti layers*/
|
||||
int exit_neutron_Ti(double *ns_tilde, struct Generalized_State_t *S0, struct Generalized_State_t *S1){
|
||||
/*!!Note that the transformation into global coordinate system must be done while logging
|
||||
as we do not have access to neither the component name nor can get the component rotation by index.*/
|
||||
Coords c1,c2;
|
||||
Rotation R1,R2;
|
||||
|
||||
/*so now compute the pseudo neutron state and possibly user variables*/
|
||||
/*momentum transfer at reflection*/
|
||||
double velocity=sqrt((S1->_vx)*(S1->_vx)+(S1->_vy)*(S1->_vy)+(S1->_vz)*(S1->_vz));
|
||||
double qtransf = V2Q*sqrt((S1->_vx-S0->_vx)*(S1->_vx-S0->_vx)+(S1->_vy-S0->_vy)*(S1->_vy-S0->_vy)+(S1->_vz-S0->_vz)*(S1->_vz-S0->_vz));
|
||||
double qinm = qtransf/0.0218;
|
||||
/*position comes from "new" state*/
|
||||
ns_tilde[0]=S1->_x;ns_tilde[1]=S1->_y;ns_tilde[2]=S1->_z;
|
||||
/*velocity is the "old" state*/
|
||||
ns_tilde[3]=S0->_vx;ns_tilde[4]=S0->_vy;ns_tilde[5]=S0->_vz;
|
||||
/*time from new*/
|
||||
ns_tilde[6]=S1->_t;
|
||||
/*spin comes from "new" state*/
|
||||
ns_tilde[7]=S1->_sx;ns_tilde[8]=S1->_sy;ns_tilde[9]=S1->_sz;
|
||||
/*weight of capture in Ni is determined analytically*/
|
||||
double captureprob;
|
||||
/* if "mvalue" is -1, than absorption happened not on the coating but somewhere else. The weight of capture in nickel should be set to zero.*/
|
||||
if ((S1->_mvalue<0)||(qinm<0.0001)) {ns_tilde[10]=0.0; captureprob=0.0;}
|
||||
else if (S1->_mvalue<1.02){captureprob=0.0; //negligible probability for capture in Ti for m=1 coatings
|
||||
}
|
||||
else // now for coatings with m>1
|
||||
{if (qinm<=1.02){
|
||||
/*q<qc(Ni) means diffusion to higher divergences and interaction with coating there*/
|
||||
captureprob=0.0045*(S1->_mvalue-0.9)*(S0->_p-S1->_p)/S0->_p;
|
||||
} else if (qinm<=S1->_mvalue+0.1) { /*q>q_c(Ni) and reflection, absorption per hit */
|
||||
captureprob=0.0045*(qinm-1.0);
|
||||
} else { /* transmission beyond smirrorcutoff*/
|
||||
captureprob=0.00225*(S1->_mvalue-0.9)*(S1->_mvalue+0.1)/qinm;}}
|
||||
/*check change in weight*/
|
||||
if((S0->_p-S1->_p)>1.e-5*S0->_p) ns_tilde[10]=S0->_p*captureprob; else ns_tilde[10]=0.0;
|
||||
//printf("%f\t%f\t%f\t%E\t%E\t%f\t%E\n",velocity, qinm, S1->_mvalue, S0->_p, S1->_p, captureprob, ns_tilde[10]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define NOABS \
|
||||
do {/* Nothing*/} while(0)
|
||||
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
int (*pseudo_neutron_state_function_Ti) (double *, struct Generalized_State_t *, struct Generalized_State_t *);
|
||||
|
||||
struct Generalized_State_t *s1,*s0;
|
||||
|
||||
double *nstate_initial;
|
||||
|
||||
int optics_not_hit;
|
||||
|
||||
/*need a pointer to the structure set up by the logger*/
|
||||
%}
|
||||
|
||||
INITIALIZE
|
||||
%{
|
||||
if (compute_func) {
|
||||
pseudo_neutron_state_function_Ti=compute_func;
|
||||
}else{
|
||||
pseudo_neutron_state_function_Ti=exit_neutron_Ti;
|
||||
}
|
||||
nstate_initial=NULL;
|
||||
|
||||
optics_not_hit=0;
|
||||
|
||||
|
||||
%}
|
||||
|
||||
|
||||
TRACE
|
||||
%{
|
||||
|
||||
//printf("Entering Iterator_Ti\n");
|
||||
/*I am the start of the pseudo neutron iterator*/
|
||||
if (nstate_initial==NULL){
|
||||
optics_not_hit=0; /* Fresh start, resetting variable */
|
||||
double *ns=nstate_initial=calloc(11,sizeof(double));
|
||||
ns[0]=x;ns[1]=y; ns[2]=z;
|
||||
ns[3]=vx;ns[4]=vy;ns[5]=vz;
|
||||
ns[6]=t;
|
||||
ns[7]=sx;ns[8]=sy;ns[9]=sz;
|
||||
ns[10]=p;
|
||||
|
||||
s0=Bounce_store;
|
||||
s1=Bounce_store+1;
|
||||
/* Remove std. ABSORB to avoid breaking analysis loop */
|
||||
#undef mcabsorb
|
||||
#define mcabsorb scatter_iterator_stop
|
||||
|
||||
|
||||
}
|
||||
|
||||
//if (s1->_p!=-1){
|
||||
if (s1->_p!=-1 && s1->_p!=-2){
|
||||
/*a neutron weight of -1 is nonsensical. I.e. if s1->p>=0, it means there are two states in the log from which we can compute a pseudo-neutron*/
|
||||
double nstate[11];
|
||||
if ( pseudo_neutron_state_function_Ti(nstate,s0,s1) ){
|
||||
printf("Warning: (%s): error reported when computing pseudo neutron\n",NAME_CURRENT_COMP);
|
||||
}
|
||||
/*set neutron state for subsequent components*/
|
||||
x=nstate[0];y=nstate[1];z=nstate[2];
|
||||
vx=nstate[3];vy=nstate[4];vz=nstate[5];
|
||||
t=nstate[6];
|
||||
sx=nstate[7];sy=nstate[8];sz=nstate[9];
|
||||
p=nstate[10];
|
||||
s0++;
|
||||
s1++;
|
||||
// printf("Ti: z=%g\tp=%g\n",z,p);
|
||||
}else if (Bounce_store[1]._p==-1){
|
||||
/*This can happen now only in the case optics was not hit, i.e. no reflection, no absorption*/
|
||||
x=s0->_x;y=s0->_y;z=s0->_z;
|
||||
vx=s0->_vx;vy=s0->_vy;vz=s0->_vz;
|
||||
t=s0->_t;
|
||||
sx=s0->_sx;sy=s0->_sy;sz=s0->_sz;
|
||||
p=s0->_p;
|
||||
optics_not_hit = 1;
|
||||
// fprintf(stdout,"No interactions with optics. Use \"optics_not_hit\" variable to JUMP at scatter_logger_stop and avoid sending to ScatterLogIterator those neutrons which were actually not scattered.\n");
|
||||
} else {
|
||||
printf("Here happens what should not happen: s1->_p=%g, Bounce_store[1]._p=%g\n",s1->_p,Bounce_store[1]._p);
|
||||
fprintf(stderr,"This should not happen. Period.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
MCDISPLAY
|
||||
%{
|
||||
/* A bit ugly; hard-coded dimensions. */
|
||||
magnify("");
|
||||
line(0,0,0,0.2,0,0);
|
||||
line(0,0,0,0,0.2,0);
|
||||
line(0,0,0,0,0,0.2);
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -1,116 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Scatter_log_iterator_stop.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Erik B Knudsen
|
||||
* Date: November 2012
|
||||
* Version: $Revision: 1.21 $
|
||||
* Release: McStas 2.1
|
||||
* Origin: DTU Physics
|
||||
*
|
||||
* Iteration stop element for a Scatter_log
|
||||
*
|
||||
* %D
|
||||
*
|
||||
* This component marks the end of the trace-region in which pseudo-neutrons are handled. Please see the Scatter_log_iterator-component for more details.
|
||||
* N.B. This component should be immediately followed by a construction like:
|
||||
* COMPONENT a1 = Arm()
|
||||
* AT (0,0,0) ABSOLUTE
|
||||
* JUMP a0 WHEN(MC_GETPAR(iterator_stop_comp_name,loop))
|
||||
*
|
||||
* This is to extract the value of the loop variable from the innards of this component
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
*
|
||||
* iterator [ ] Instance name of the Scatter_log_iterator log component preceeding this one.
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Shielding_log_iterator_stop
|
||||
DEFINITION PARAMETERS (iterator)
|
||||
SETTING PARAMETERS (int last=0)
|
||||
OUTPUT PARAMETERS (loop)
|
||||
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
|
||||
|
||||
SHARE
|
||||
%{
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
int loop;
|
||||
%}
|
||||
|
||||
INITIALIZE
|
||||
%{
|
||||
loop=1;
|
||||
%}
|
||||
|
||||
|
||||
TRACE
|
||||
%{
|
||||
#ifdef scatter_iterator_stop
|
||||
#undef scatter_iterator_stop
|
||||
#endif
|
||||
#define scatter_iterator_stop iterator
|
||||
scatter_iterator_stop:
|
||||
loop=1;
|
||||
struct Generalized_State_t *s1=MC_GETPAR(iterator,s1);
|
||||
|
||||
if (s1->_p==-1){
|
||||
/*we have reached the end - unset loop and reset neutron state to whatever it was before we entered the pseudo neutron iterator*/
|
||||
loop=0;
|
||||
double *ns=MC_GETPAR(iterator,nstate_initial);
|
||||
x=ns[0];y=ns[1];z=ns[2];
|
||||
vx=ns[3];vy=ns[4];vz=ns[5];
|
||||
t=ns[6];
|
||||
sx=ns[7];sy=ns[8];sz=ns[9];
|
||||
p=ns[10];
|
||||
|
||||
free(ns);
|
||||
MC_GETPAR(iterator,nstate_initial)=NULL;
|
||||
/* Restore std ABSORB */
|
||||
#undef mcabsorb
|
||||
#define mcabsorb mcabsorbAll
|
||||
// printf("No ABSORB after the iterator\n");
|
||||
} else if (s1->_p==-2) {
|
||||
/*if the weight equals -2 it means that the neutron was absorbed in components within the scatter_logger (see scatter logger definition)
|
||||
and should not be propagated further after this iterator*/
|
||||
// printf("Performing ABSORB after the iterator\n");
|
||||
/*we have reached the end - unset loop and reset neutron state to whatever it was before we entered the pseudo neutron iterator*/
|
||||
loop=0;
|
||||
double *ns=MC_GETPAR(iterator,nstate_initial);
|
||||
x=ns[0];y=ns[1];z=ns[2];
|
||||
vx=ns[3];vy=ns[4];vz=ns[5];
|
||||
t=ns[6];
|
||||
sx=ns[7];sy=ns[8];sz=ns[9];
|
||||
p=ns[10];
|
||||
|
||||
free(ns);
|
||||
MC_GETPAR(iterator,nstate_initial)=NULL;
|
||||
/* Restore std ABSORB */
|
||||
#undef mcabsorb
|
||||
#define mcabsorb mcabsorbAll
|
||||
if (last>0) ABSORB; //Will sample new neutron.
|
||||
}
|
||||
%}
|
||||
|
||||
MCDISPLAY
|
||||
%{
|
||||
/* A bit ugly; hard-coded dimensions. */
|
||||
magnify("");
|
||||
line(0,0,0,0.2,0,0);
|
||||
line(0,0,0,0,0.2,0);
|
||||
line(0,0,0,0,0,0.2);
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -1,165 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Scatter_log_iterator.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Erik B Knudsen
|
||||
* Date: November 2012
|
||||
* Version: $Revision: 1.21 $
|
||||
* Release: McStas 2.1
|
||||
* Origin: DTU Physics
|
||||
*
|
||||
* Iteration element for a Scatter_log
|
||||
*
|
||||
* %D
|
||||
*
|
||||
* This component marks the beginning of the region in trace in which pseudo-neutrons
|
||||
* are to be propagated. Pseudo-neutrons are neutrons which are generated by the function
|
||||
* <i>compute_func</i> from before and after SCATTER neutron states which have been logged by
|
||||
* a set of Scatter_logger/Scatter_logger_stop components.
|
||||
* N.B. This component should be immediately preceeded by an Arm. Any components between this one
|
||||
* and a subsequent Scatter_log_iterator_stop-component will be visited by the set of pseudo-neutrons
|
||||
* as if they were regular neutrons in the classical McStas-manner.
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
*
|
||||
* compute_func [ ] : Address of the function that computes a psuedo neutron from before and after scatter states.
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Shielding_log_iterator_total
|
||||
DEFINITION PARAMETERS (compute_func=NULL)
|
||||
SETTING PARAMETERS ()
|
||||
OUTPUT PARAMETERS (nstate_initial,s0,s1)
|
||||
/* Neutron parameters: (x,y,z,vx,vy,vz,t,sx,sy,sz,p) */
|
||||
|
||||
SHARE
|
||||
%{
|
||||
/*This is the specialized pseudo-neutron function that computes
|
||||
an escaping neutron from logged before and after SCATTER neutron states*/
|
||||
int exit_neutron(double *ns_tilde, struct Generalized_State_t *S0, struct Generalized_State_t *S1){
|
||||
/*!!Note that the transformation into global coordinate system must be done while logging
|
||||
as we do not have access to neither the component name nor can get the component rotation by index.*/
|
||||
Coords c1,c2;
|
||||
Rotation R1,R2;
|
||||
|
||||
/*so now compute the pseudo neutron state and possibly user variables*/
|
||||
/*position comes from "new" state*/
|
||||
ns_tilde[0]=S1->_x;ns_tilde[1]=S1->_y;ns_tilde[2]=S1->_z;
|
||||
/*velocity is the "old" state*/
|
||||
ns_tilde[3]=S0->_vx;ns_tilde[4]=S0->_vy;ns_tilde[5]=S0->_vz;
|
||||
/*time from new*/
|
||||
ns_tilde[6]=S1->_t;
|
||||
/*spin comes from "new" state*/
|
||||
ns_tilde[7]=S1->_sx;ns_tilde[8]=S1->_sy;ns_tilde[9]=S1->_sz;
|
||||
/*weight is difference old-new to mean the neutrons "deposited" in the guide wall*/
|
||||
ns_tilde[10]=S0->_p-S1->_p;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define NOABS \
|
||||
do {/* Nothing*/} while(0)
|
||||
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
int (*pseudo_neutron_state_function) (double *, struct Generalized_State_t *, struct Generalized_State_t *);
|
||||
|
||||
struct Generalized_State_t *s1,*s0;
|
||||
|
||||
double *nstate_initial;
|
||||
|
||||
int optics_not_hit;
|
||||
|
||||
/*need a pointer to the structure set up by the logger*/
|
||||
%}
|
||||
|
||||
INITIALIZE
|
||||
%{
|
||||
if (compute_func) {
|
||||
pseudo_neutron_state_function=compute_func;
|
||||
}else{
|
||||
pseudo_neutron_state_function=exit_neutron;
|
||||
}
|
||||
nstate_initial=NULL;
|
||||
|
||||
optics_not_hit=0;
|
||||
|
||||
|
||||
%}
|
||||
|
||||
|
||||
TRACE
|
||||
%{
|
||||
//printf("Entering Iterator_total\n");
|
||||
/*I am the start of the pseudo neutron iterator*/
|
||||
if (nstate_initial==NULL){
|
||||
optics_not_hit=0; /* Fresh start, resetting variable */
|
||||
double *ns=nstate_initial=calloc(11,sizeof(double));
|
||||
ns[0]=x;ns[1]=y; ns[2]=z;
|
||||
ns[3]=vx;ns[4]=vy;ns[5]=vz;
|
||||
ns[6]=t;
|
||||
ns[7]=sx;ns[8]=sy;ns[9]=sz;
|
||||
ns[10]=p;
|
||||
|
||||
s0=Bounce_store;
|
||||
s1=Bounce_store+1;
|
||||
/* Remove std. ABSORB to avoid breaking analysis loop */
|
||||
#undef mcabsorb
|
||||
#define mcabsorb scatter_iterator_stop
|
||||
|
||||
|
||||
}
|
||||
|
||||
//if (s1->_p!=-1){
|
||||
if (s1->_p!=-1 && s1->_p!=-2){
|
||||
/*a neutron weight of -1 is nonsensical. I.e. if s1->p>=0, it means there are two states in the log from which we can compute a pseudo-neutron*/
|
||||
double nstate[11];
|
||||
if ( pseudo_neutron_state_function(nstate,s0,s1) ){
|
||||
printf("Warning: (%s): error reported when computing pseudo neutron\n",NAME_CURRENT_COMP);
|
||||
}
|
||||
/*set neutron state for subsequent components*/
|
||||
x=nstate[0];y=nstate[1];z=nstate[2];
|
||||
vx=nstate[3];vy=nstate[4];vz=nstate[5];
|
||||
t=nstate[6];
|
||||
sx=nstate[7];sy=nstate[8];sz=nstate[9];
|
||||
p=nstate[10];
|
||||
s0++;
|
||||
s1++;
|
||||
// printf("Tot: z=%g\tp=%g\n",z,p);
|
||||
}else if (Bounce_store[1]._p==-1){
|
||||
/*This can happen now only in the case optics was not hit, i.e. no reflection, no absorption*/
|
||||
x=s0->_x;y=s0->_y;z=s0->_z;
|
||||
vx=s0->_vx;vy=s0->_vy;vz=s0->_vz;
|
||||
t=s0->_t;
|
||||
sx=s0->_sx;sy=s0->_sy;sz=s0->_sz;
|
||||
p=s0->_p;
|
||||
optics_not_hit = 1;
|
||||
// fprintf(stdout,"No interactions with optics. Use \"optics_not_hit\" variable to JUMP at scatter_logger_stop and avoid sending to ScatterLogIterator those neutrons which were actually not scattered.\n");
|
||||
} else {
|
||||
printf("Here happens what should not happen: s1->_p=%g, Bounce_store[1]._p=%g\n",s1->_p,Bounce_store[1]._p);
|
||||
fprintf(stderr,"This should not happen. Period.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
MCDISPLAY
|
||||
%{
|
||||
/* A bit ugly; hard-coded dimensions. */
|
||||
magnify("");
|
||||
line(0,0,0,0.2,0,0);
|
||||
line(0,0,0,0,0.2,0);
|
||||
line(0,0,0,0,0,0.2);
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -1,217 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Scatter_logger.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Erik B Knudsen, Peter K Willendrup & Esben Klinkby
|
||||
* Date: January 2013
|
||||
* Version: $Revision: 1.12 $
|
||||
* Release: McStas 2.1
|
||||
* Origin: DTU Physics / DTU Nutech
|
||||
*
|
||||
* Logging iteractions of neutrons with components
|
||||
*
|
||||
* %D
|
||||
* Start of the trace-region in which SCATTER events should be logged.
|
||||
* Whenever a SCATTER occurs in components between this one and its counterpart Scatter_logger_stop the neutron state is logged.
|
||||
* The log is kept in memory - but only for one single
|
||||
* numerical neutron at a time, so there should be no real danger of memory overrun.
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
*
|
||||
* (none)
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Shielding_logger
|
||||
DEFINITION PARAMETERS ()
|
||||
SETTING PARAMETERS ()
|
||||
OUTPUT PARAMETERS ()
|
||||
|
||||
SHARE
|
||||
%{
|
||||
|
||||
// m_local_refl is to be used in shielding applications and accessed by shielding logger
|
||||
#ifndef MVALUE_LOCAL_IS_DEF
|
||||
#define MVALUE_LOCAL_IS_DEF 1
|
||||
double m_local_refl=-1;
|
||||
#endif
|
||||
|
||||
struct Generalized_State_t {
|
||||
double _x,_y,_z,_vx,_vy,_vz;
|
||||
double _p,_t,_sx,_sy,_sz;
|
||||
double _mvalue; // coating m-value in the place of the hit
|
||||
long long int _nid;
|
||||
int _comp, _idx;
|
||||
};
|
||||
|
||||
#define SCATTER_LOG do { \
|
||||
if (bounce_store_index<BOUNCE_LOG_SIZE-1){\
|
||||
struct Generalized_State_t *bp=&(Bounce_store[bounce_store_index]);\
|
||||
if( (bp-1)->_p!=p || (bp-1)->_vx!=vx || (bp-1)->_vy!=vy || (bp-1)->_vz!=vz ){\
|
||||
Coords ctmp=POS_A_CURRENT_COMP;\
|
||||
Coords _r = coords_set(x,y,z);\
|
||||
Coords _v = coords_set(vx,vy,vz);\
|
||||
Coords _s = coords_set(sx,sy,sz);\
|
||||
Coords _rg,_vg,_sg;\
|
||||
Rotation _Rt;\
|
||||
rot_transpose(ROT_A_CURRENT_COMP,_Rt);\
|
||||
_rg=coords_add(rot_apply(_Rt,_r),ctmp);\
|
||||
_vg=rot_apply(_Rt,_v);\
|
||||
_sg=rot_apply(_Rt,_s);\
|
||||
coords_get(_rg,&(bp->_x),&(bp->_y),&(bp->_z));\
|
||||
coords_get(_vg,&(bp->_vx),&(bp->_vy),&(bp->_vz));\
|
||||
coords_get(_sg,&(bp->_sx),&(bp->_sy),&(bp->_sz));\
|
||||
bp->_t=t;\
|
||||
bp->_p=p;\
|
||||
bp->_nid=mcget_run_num();\
|
||||
bp->_comp=INDEX_CURRENT_COMP;\
|
||||
bp->_idx=bounce_store_index;\
|
||||
/* New: registering m-value at reflection. it is set to -1 by component the if we missed coating */\
|
||||
bp->_mvalue=m_local_refl;\
|
||||
/* printf("Recording scattering, writing state (%d) to the buffer, r: %g %g %g v: %g %g %g p:%g\n",\
|
||||
bounce_store_index, bp->_x, bp->_y, bp->_z, bp->_vx, bp->_vy, bp->_vz, bp->_p);*/\
|
||||
bounce_store_index++;\
|
||||
}\
|
||||
}else if(bounce_store_index==(BOUNCE_LOG_SIZE-1) && !bounce_store_overrun){\
|
||||
printf("Warning (%s): Scatter_log overrun at %llu - not logging any more events\n",NAME_CURRENT_COMP,mcget_run_num());\
|
||||
bounce_store_overrun=1;\
|
||||
}\
|
||||
do {mcDEBUG_SCATTER(mcnlx, mcnly, mcnlz, mcnlvx, mcnlvy, mcnlvz, \
|
||||
mcnlt,mcnlsx,mcnlsy,mcnlsz, mcnlp); mcScattered++;} while(0);\
|
||||
} while(0)
|
||||
|
||||
#define ABSORB_LOG do { /*printf("DOING ABSORB_LOG\n");*/ \
|
||||
if (bounce_store_index<BOUNCE_LOG_SIZE-1){\
|
||||
struct Generalized_State_t *bp=&(Bounce_store[bounce_store_index]);\
|
||||
/* if( (bp-1)->_p!=p || (bp-1)->_vx!=vx || (bp-1)->_vy!=vy || (bp-1)->_vz!=vz )*//*<-- Check removed, works wrong if neutron is absorbed at the entrance*/{\
|
||||
Coords ctmp=POS_A_CURRENT_COMP;\
|
||||
Coords _r = coords_set(x,y,z);\
|
||||
Coords _v = coords_set(vx,vy,vz);\
|
||||
Coords _s = coords_set(sx,sy,sz);\
|
||||
Coords _rg,_vg,_sg;\
|
||||
Rotation _Rt;\
|
||||
rot_transpose(ROT_A_CURRENT_COMP,_Rt);\
|
||||
_rg=coords_add(rot_apply(_Rt,_r),ctmp);\
|
||||
_vg=rot_apply(_Rt,_v);\
|
||||
_sg=rot_apply(_Rt,_s);\
|
||||
coords_get(_rg,&(bp->_x),&(bp->_y),&(bp->_z));\
|
||||
coords_get(_vg,&(bp->_vx),&(bp->_vy),&(bp->_vz));\
|
||||
/*bp->_vx=0.; bp->_vy=0.; bp->_vz=0.;*/\
|
||||
/*vx=0; vy=0;vz=0;*/\
|
||||
coords_get(_sg,&(bp->_sx),&(bp->_sy),&(bp->_sz));\
|
||||
bp->_t=t;\
|
||||
bp->_p=0.;\
|
||||
bp->_nid=mcget_run_num();\
|
||||
bp->_comp=INDEX_CURRENT_COMP;\
|
||||
bp->_idx=bounce_store_index;\
|
||||
bp->_mvalue=m_local_refl;\
|
||||
/* printf("Recording absorption event, writing state (%d) to the buffer, r: %g %g %g v: %g %g %g p:%g\n",\
|
||||
bounce_store_index, bp->_x, bp->_y, bp->_z, bp->_vx, bp->_vy, bp->_vz, bp->_p);*/\
|
||||
bounce_store_index++;\
|
||||
}\
|
||||
}else if(bounce_store_index==(BOUNCE_LOG_SIZE-1) && !bounce_store_overrun){\
|
||||
printf("Warning (%s): Scatter_log overrun at %llu - not logging any more events\n",NAME_CURRENT_COMP,mcget_run_num());\
|
||||
bounce_store_overrun=1;\
|
||||
}\
|
||||
absorbed_in_optics=1;\
|
||||
do {mcDEBUG_STATE(mcnlx, mcnly, mcnlz, mcnlvx, mcnlvy, mcnlvz, \
|
||||
mcnlt,mcnlsx,mcnlsy,mcnlsz, mcnlp); mcDEBUG_ABSORB(); MAGNET_OFF; goto mcabsorb;} while(0);\
|
||||
} while(0)
|
||||
|
||||
|
||||
#define SCATTER0\
|
||||
do {mcDEBUG_SCATTER(mcnlx, mcnly, mcnlz, mcnlvx, mcnlvy, mcnlvz, \
|
||||
mcnlt,mcnlsx,mcnlsy,mcnlsz, mcnlp); mcScattered++;} while(0)
|
||||
|
||||
#define ABSORB0\
|
||||
do {mcDEBUG_STATE(mcnlx, mcnly, mcnlz, mcnlvx, mcnlvy, mcnlvz, \
|
||||
mcnlt,mcnlsx,mcnlsy,mcnlsz, mcnlp); mcDEBUG_ABSORB(); MAGNET_OFF; goto mcabsorb;} while(0)
|
||||
|
||||
|
||||
|
||||
const int BOUNCE_LOG_SIZE=10000000;
|
||||
struct Generalized_State_t *Bounce_store;
|
||||
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
int bounce_store_index;
|
||||
int bounce_store_overrun;
|
||||
int absorbed_in_optics;
|
||||
%}
|
||||
|
||||
INITIALIZE
|
||||
%{
|
||||
bounce_store_index=0;
|
||||
absorbed_in_optics=0;
|
||||
Bounce_store=malloc(sizeof(*Bounce_store)*BOUNCE_LOG_SIZE);
|
||||
Bounce_store[BOUNCE_LOG_SIZE-1]._p=-1;
|
||||
%}
|
||||
|
||||
|
||||
TRACE
|
||||
%{
|
||||
#undef SCATTER
|
||||
#define SCATTER SCATTER_LOG
|
||||
|
||||
#undef ABSORB
|
||||
#define ABSORB ABSORB_LOG
|
||||
|
||||
/*
|
||||
#ifdef scatter_logger_stop
|
||||
#undef scatter_logger_stop
|
||||
#endif
|
||||
|
||||
#define scatter_logger_stop logger
|
||||
*/
|
||||
#undef mcabsorb
|
||||
#define mcabsorb scatter_logger_stop
|
||||
|
||||
bounce_store_index=0;/*we are now starting logging so we should start afresh*/
|
||||
absorbed_in_optics=0;/*we are now starting logging so we should start afresh*/
|
||||
if (bounce_store_index<BOUNCE_LOG_SIZE){
|
||||
struct Generalized_State_t *bp=&(Bounce_store[bounce_store_index]);
|
||||
Coords ctmp=POS_A_CURRENT_COMP;
|
||||
Coords r = coords_set(x,y,z);
|
||||
Coords v = coords_set(vx,vy,vz);
|
||||
Coords s = coords_set(sx,sy,sz);
|
||||
|
||||
Coords rg,vg,sg;
|
||||
|
||||
Rotation Rt;
|
||||
rot_transpose(ROT_A_CURRENT_COMP,Rt);
|
||||
rg=coords_add(rot_apply(Rt,r),ctmp);
|
||||
vg=rot_apply(Rt,v);
|
||||
sg=rot_apply(Rt,s);
|
||||
coords_get(rg,&(bp->_x),&(bp->_y),&(bp->_z));
|
||||
coords_get(vg,&(bp->_vx),&(bp->_vy),&(bp->_vz));
|
||||
coords_get(sg,&(bp->_sx),&(bp->_sy),&(bp->_sz));
|
||||
bp->_t=t;
|
||||
bp->_p=p;
|
||||
bp->_nid=mcget_run_num();
|
||||
bp->_comp=INDEX_CURRENT_COMP;
|
||||
bp->_idx=bounce_store_index;
|
||||
bp->_mvalue=0.0; // This is the incoming particle. No collision, setting mvalue=0.
|
||||
// printf("Starting scatter logger, writing state (%d) to the buffer, r: %g %g %g v: %g %g %g p: %g\n", bounce_store_index, bp->_x, bp->_y, bp->_z, bp->_vx, bp->_vy, bp->_vz, bp->_p);
|
||||
bounce_store_index++;
|
||||
}else if(bounce_store_index==BOUNCE_LOG_SIZE && !bounce_store_overrun){
|
||||
printf("Warning (%s): Scatter_log overrun - not logging any more SCATTER events\n",NAME_CURRENT_COMP);
|
||||
bounce_store_overrun=1;
|
||||
}
|
||||
%}
|
||||
|
||||
FINALLY
|
||||
%{
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -1,121 +0,0 @@
|
||||
/*******************************************************************************
|
||||
*
|
||||
* McStas, neutron ray-tracing package
|
||||
* Copyright 1997-2002, All rights reserved
|
||||
* Risoe National Laboratory, Roskilde, Denmark
|
||||
* Institut Laue Langevin, Grenoble, France
|
||||
*
|
||||
* Component: Scatter_logger_stop.comp
|
||||
*
|
||||
* %I
|
||||
*
|
||||
* Written by: Erik B Knudsen, Peter K Willendrup & Esben Klinkby
|
||||
* Date: January 2013
|
||||
* Version: $Revision: 1.12 $
|
||||
* Release: McStas 2.1
|
||||
* Origin: DTU Physics / DTU Nutech
|
||||
*
|
||||
* Stop logging iteractions of neutrons with components
|
||||
*
|
||||
* %D
|
||||
* Component which marks the end of the region where SCATTER events should be logged.
|
||||
*
|
||||
* %P
|
||||
* Input parameters:
|
||||
*
|
||||
* logger: The Scatter_logger.comp which began the logging region. This is necessary to allow communication between the components. ( )
|
||||
*
|
||||
* %E
|
||||
*******************************************************************************/
|
||||
|
||||
DEFINE COMPONENT Shielding_logger_stop
|
||||
DEFINITION PARAMETERS (logger)
|
||||
SETTING PARAMETERS ()
|
||||
OUTPUT PARAMETERS ()
|
||||
|
||||
SHARE
|
||||
%{
|
||||
#define SCATTER0\
|
||||
do {mcDEBUG_SCATTER(mcnlx, mcnly, mcnlz, mcnlvx, mcnlvy, mcnlvz, \
|
||||
mcnlt,mcnlsx,mcnlsy,mcnlsz, mcnlp); mcScattered++;} while(0)
|
||||
#define ABSORB0\
|
||||
do {mcDEBUG_STATE(mcnlx, mcnly, mcnlz, mcnlvx, mcnlvy, mcnlvz, \
|
||||
mcnlt,mcnlsx,mcnlsy,mcnlsz, mcnlp); mcDEBUG_ABSORB(); MAGNET_OFF; goto mcabsorb;} while(0)
|
||||
%}
|
||||
|
||||
DECLARE
|
||||
%{
|
||||
int bounce_store_index;
|
||||
int bounce_store_overrun;
|
||||
int logger_buffer_cleared;
|
||||
%}
|
||||
|
||||
INITIALIZE
|
||||
%{
|
||||
#ifndef logger
|
||||
fprintf(stderr,"Error(%s): Logger undefined - can't stop noexisting logger\n", NAME_CURRENT_COMP);
|
||||
#endif
|
||||
logger_buffer_cleared=0;
|
||||
%}
|
||||
|
||||
|
||||
TRACE
|
||||
%{
|
||||
|
||||
#undef SCATTER
|
||||
#define SCATTER SCATTER0
|
||||
|
||||
#undef ABSORB
|
||||
#define ABSORB ABSORB0
|
||||
|
||||
#undef mcabsorb
|
||||
#define mcabsorb mcabsorbAll
|
||||
|
||||
#ifdef scatter_logger_stop
|
||||
#undef scatter_logger_stop
|
||||
#endif
|
||||
|
||||
#define scatter_logger_stop logger
|
||||
scatter_logger_stop:
|
||||
|
||||
if (bounce_store_index<BOUNCE_LOG_SIZE){
|
||||
struct Generalized_State_t *bp;
|
||||
bp=&(Bounce_store[bounce_store_index]);
|
||||
bp->_x=0;
|
||||
bp->_y=0;
|
||||
bp->_z=0;
|
||||
bp->_vx=0;
|
||||
bp->_vy=0;
|
||||
bp->_vz=0;
|
||||
bp->_sx=0;
|
||||
bp->_sy=0;
|
||||
bp->_sz=0;
|
||||
bp->_t=0;
|
||||
if(absorbed_in_optics==1) bp->_p=-2; else bp->_p=-1;
|
||||
bp->_nid=0;
|
||||
bp->_comp=0;
|
||||
bounce_store_index++;
|
||||
}else if(bounce_store_index==BOUNCE_LOG_SIZE && !bounce_store_overrun){
|
||||
printf("Warning (%s): Scatter_log overrun - cannot set stop bit. Aborting\n",NAME_CURRENT_COMP);
|
||||
exit(1);
|
||||
}
|
||||
%}
|
||||
|
||||
FINALLY
|
||||
%{
|
||||
/*If we are a logger stop we should also free the memory*/
|
||||
int i;
|
||||
struct Generalized_State_t *bp;
|
||||
for (i=0;i<BOUNCE_LOG_SIZE;i++){
|
||||
bp=&(Bounce_store[i]);
|
||||
/* maybe this should be in the share block - must be able to discern between different loggers*/
|
||||
/* printf("SCATTERLOG: %d %lld %g %g %g %g %g %g %g %g %g %g %g %d\n", \*/
|
||||
/* i,bp->_nid,bp->_x,bp->_y,bp->_z, bp->_vx, bp->_vy, bp->_vz, bp->_t, \*/
|
||||
/* bp->_sx, bp->_sy, bp->_sz, bp->_p, bp->_comp);*/
|
||||
}
|
||||
if (!logger_buffer_cleared) { free(Bounce_store); logger_buffer_cleared=1;}
|
||||
|
||||
/*do nothing if the memory has already been freed*/
|
||||
%}
|
||||
|
||||
END
|
||||
@@ -0,0 +1,4 @@
|
||||
foreach z ( `seq -0.5 0.125 0.5` )
|
||||
echo $z
|
||||
./run_simu.sh $z
|
||||
end
|
||||
@@ -0,0 +1,174 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEST=../results
|
||||
ncount=1e10
|
||||
use_cores=64
|
||||
use_host=mcc05,mcc06
|
||||
lambda_min=3.75
|
||||
lambda_start=3.0
|
||||
lambda_end=30.0
|
||||
|
||||
if [ Estia_liquids.instr -nt Estia_liquids.out ] || [ ! -f Estia_liquids.out ] \
|
||||
|| [ Estia_feeder.instr -nt Estia_liquids.out ] \
|
||||
|| [ Estia_selene1.instr -nt Estia_liquids.out ] \
|
||||
|| [ Estia_mf.instr -nt Estia_liquids.out ] \
|
||||
|| [ Estia_selene2.instr -nt Estia_liquids.out ]; then
|
||||
rm Estia_liquids.c Estia_liquids.out
|
||||
mcstas -o Estia_liquids.c Estia_liquids.instr
|
||||
mpicc -O3 -o Estia_liquids.out Estia_liquids.c -lm -DUSE_MPI
|
||||
fi
|
||||
|
||||
###################### Reference measurement ####################
|
||||
|
||||
sample=1
|
||||
omega=1.3
|
||||
DESTi=$DEST/liquids_ref_13
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=0 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_ref_25
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=0 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_ref_39
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=1 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_ref_61
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=2 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
###################### Ni-layer measurement ####################
|
||||
|
||||
sample=2
|
||||
omega=1.3
|
||||
DESTi=$DEST/liquids_ni_13
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=0 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_ni_25
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=0 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_ni_39
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=1 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_ni_61
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=2 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
###################### D2O measurement ####################
|
||||
|
||||
sample=0
|
||||
omega=1.3
|
||||
DESTi=$DEST/liquids_d2o_13
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=0 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_d2o_25
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=0 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_d2o_39
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=1 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
omega=2.5
|
||||
DESTi=$DEST/liquids_d2o_61
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores --host $use_host Estia_liquids.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega theta_resolution=0.04 \
|
||||
sample=$sample reflector=2 \
|
||||
lambda_end=$lambda_end lambda_min=$lambda_min lambda_start=$lambda_start
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
mcstas -o Estia_monitor.c Estia_monitor.instr
|
||||
mpicc -O3 -o Estia_monitor.out Estia_monitor.c -lm -DUSE_MPI
|
||||
|
||||
|
||||
mpirun -np 6 Estia_monitor.out --ncount=1e8 --dir=../results/monitor --gravitation enable_windows=1 lambda_start=1.0 lambda_end=35.0 direct_beam=0
|
||||
mpirun -np 6 Estia_monitor.out --ncount=1e8 --dir=../results/monitor_ref --gravitation enable_windows=1 lambda_start=1.0 lambda_end=35.0 direct_beam=2
|
||||
mpirun -np 6 Estia_monitor.out --ncount=1e8 --dir=../results/monitor_trans --gravitation enable_windows=1 lambda_start=1.0 lambda_end=35.0 direct_beam=1
|
||||
|
||||
mpirun -np 6 Estia_monitor.out --ncount=1e8 --dir=../results/monitor100 --gravitation enable_windows=1 lambda_start=1.0 lambda_end=35.0 direct_beam=0 foil_thickness=0.0001
|
||||
mpirun -np 6 Estia_monitor.out --ncount=1e8 --dir=../results/monitor001 --gravitation enable_windows=1 lambda_start=1.0 lambda_end=35.0 direct_beam=0 foil_thickness=0.000001
|
||||
Executable
+213
@@ -0,0 +1,213 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEST=../results
|
||||
ncount=2e7
|
||||
use_cores=4
|
||||
sample=4
|
||||
omega=0.8
|
||||
sample_length=0.01
|
||||
sample_height=0.01
|
||||
lambda_start=3.0
|
||||
lambda_end=32.0
|
||||
|
||||
###################### Brilliance Transfer 10x10mm² and 1x1mm² VS ####################
|
||||
if [ Estia_baseline.instr -nt Estia_baseline.out ]; then
|
||||
rm Estia_baseline.c Estia_baseline.out
|
||||
mcstas -o Estia_baseline.c Estia_baseline.instr
|
||||
mpicc -O3 -o Estia_baseline.out Estia_baseline.c -lm -DUSE_MPI -DUSE_NEXUS -lNeXus
|
||||
fi
|
||||
#
|
||||
# if [ Estia_baseline_ana1.instr -nt Estia_baseline_ana1.out ]; then
|
||||
# rm Estia_baseline_ana1.c Estia_baseline_ana1.out
|
||||
# mcstas -o Estia_baseline_ana1.c Estia_baseline_ana1.instr
|
||||
# mpicc -O3 -o Estia_baseline_ana1.out Estia_baseline_ana1.c -lm -DUSE_MPI -DUSE_NEXUS -lNeXus
|
||||
# fi
|
||||
#
|
||||
# if [ Estia_baseline_ana2.instr -nt Estia_baseline_ana2.out ]; then
|
||||
# rm Estia_baseline_ana2.c Estia_baseline_ana2.out
|
||||
# mcstas -o Estia_baseline_ana2.c Estia_baseline_ana2.instr
|
||||
# mpicc -O3 -o Estia_baseline_ana2.out Estia_baseline_ana2.c -lm -DUSE_MPI -DUSE_NEXUS -lNeXus
|
||||
# fi
|
||||
|
||||
|
||||
###################### Reference and Ni-layer measurement 10x10mm² sample ####################
|
||||
# ncount=1e10
|
||||
sample_length=0.01
|
||||
sample_height=0.01
|
||||
lambda_start=3.5
|
||||
lambda_end=30.0
|
||||
sample=1
|
||||
|
||||
# omega=1.0
|
||||
# DESTi=$DEST/pol_ref_10x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=0 enable_analyzer=0
|
||||
#
|
||||
# DESTi=$DEST/pol1_10x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=1 enable_analyzer=0
|
||||
#
|
||||
# DESTi=$DEST/pol2_10x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=2 enable_analyzer=0
|
||||
# #
|
||||
# omega=7.0
|
||||
# DESTi=$DEST/pol1_10x10_70
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=1 enable_analyzer=0
|
||||
#
|
||||
# DESTi=$DEST/pol2_10x10_70
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=2 enable_analyzer=0
|
||||
#
|
||||
|
||||
# ncount=1e8
|
||||
omega=0.0
|
||||
# DESTi=$DEST/pol1_10x50_70
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0025 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=1 enable_analyzer=0
|
||||
|
||||
DESTi=$DEST/pol2_10x50_70
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0025 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=2 enable_analyzer=0
|
||||
#
|
||||
# ncount=5e9
|
||||
# sample_length=0.01
|
||||
# omega=1.0
|
||||
# sample_length=0.003
|
||||
# DESTi=$DEST/pol_ref_3x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=0 enable_analyzer=0
|
||||
#
|
||||
# DESTi=$DEST/pol1_3x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=1 enable_analyzer=0
|
||||
#
|
||||
# DESTi=$DEST/pol2_3x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=2 enable_analyzer=0
|
||||
#
|
||||
#
|
||||
# sample_height=0.01
|
||||
# sample_length=0.01
|
||||
# DESTi=$DEST/ana1_10x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=0 enable_analyzer=1
|
||||
|
||||
# sample_height=0.001
|
||||
# DESTi=$DEST/ana1_10x1_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline_ana1.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=0 enable_analyzer=1
|
||||
#
|
||||
# sample_height=0.01
|
||||
# DESTi=$DEST/ana2_10x10_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=0 enable_analyzer=2
|
||||
|
||||
# sample_height=0.001
|
||||
# DESTi=$DEST/ana2_10x1_10
|
||||
# if [ -e "$DESTi" ]; then
|
||||
# rm -r "$DESTi"
|
||||
# fi
|
||||
#
|
||||
# mpirun -np $use_cores Estia_baseline_ana2.out \
|
||||
# --dir="$DESTi" --ncount=$ncount --gravitation \
|
||||
# omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.000 \
|
||||
# sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
# lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=0 enable_polarizer=0 enable_analyzer=2
|
||||
|
||||
|
||||
###################### Reference and Ni-layer measurement 1x1mm² sample ####################
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEST=../results
|
||||
use_cores=6
|
||||
|
||||
###################### Compile model if necessary ####################
|
||||
bash compile_if_neede.sh
|
||||
|
||||
######## Reference and Ni-layer conventional measurement 10x10mm² sample #############
|
||||
ncount=1e10
|
||||
sample_length=0.01
|
||||
sample_height=0.01
|
||||
lambda_start=3.25
|
||||
lambda_min=3.75
|
||||
lambda_end=12.75
|
||||
sample=1
|
||||
|
||||
omega=1.0
|
||||
DESTi=$DEST/tof_reference_10x10_10
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=1 theta_resolution=0.01 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_min=$lambda_min lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
|
||||
|
||||
# Ni Sample
|
||||
ncount=2e10
|
||||
sample=2
|
||||
omega=0.5
|
||||
DESTi=$DEST/tof_nickle_10x10_05
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=1 theta_resolution=0.03 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_min=$lambda_min lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
|
||||
|
||||
ncount=1e10
|
||||
omega=1.2
|
||||
DESTi=$DEST/tof_nickle_10x10_12
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=1 theta_resolution=0.03 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_min=$lambda_min lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
|
||||
|
||||
ncount=5e9
|
||||
omega=3.0
|
||||
DESTi=$DEST/tof_nickle_10x10_30
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=1 theta_resolution=0.03 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_min=$lambda_min lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
|
||||
|
||||
ncount=2e9
|
||||
omega=7.5
|
||||
DESTi=$DEST/tof_nickle_10x10_75
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=1 theta_resolution=0.03 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_min=$lambda_min lambda_end=$lambda_end enable_gravity=1 enable_chopper=1
|
||||
|
||||
###################### Reference and Ni-layer measurement 1x1mm² sample ####################
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEST=../results
|
||||
ncount=1e9
|
||||
use_cores=6
|
||||
sample=4
|
||||
omega=0.8
|
||||
sample_length=0.01
|
||||
sample_height=0.01
|
||||
lambda_start=3.0
|
||||
lambda_end=32.0
|
||||
|
||||
bash compile_if_neede.sh
|
||||
|
||||
|
||||
################# Reference and Ni-layer measurement 2 pulse skipping ####################
|
||||
ncount=4e9
|
||||
sample_length=0.01
|
||||
sample_height=0.01
|
||||
lambda_start=3.9
|
||||
lambda_end=24.0
|
||||
sample=1
|
||||
omega=2.0
|
||||
|
||||
DESTi=$DEST/single_skip_reference
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0002 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=3
|
||||
|
||||
sample=2
|
||||
DESTi=$DEST/single_skip_nickle
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0002 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=1 enable_chopper=3
|
||||
@@ -0,0 +1,119 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEST=../results
|
||||
ncount=1e9
|
||||
use_cores=6
|
||||
sample=1
|
||||
omega=15.0
|
||||
sample_length=0.02
|
||||
sample_height=0.01
|
||||
|
||||
lambda_start=3.5
|
||||
lambda_min=5.0
|
||||
lambda_end=15.5
|
||||
frame_usage=0.92
|
||||
|
||||
###################### Brilliance Transfer 10x10mm² and 1x1mm² VS ####################
|
||||
bash compile_if_neede.sh
|
||||
|
||||
###################### Reference and Ni-layer measurement 10x10mm² sample ####################
|
||||
|
||||
frame_usage=0.92
|
||||
DESTi=$DEST/chopper_f1_092
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1 \
|
||||
frame_usage=$frame_usage lambda_min=$lambda_min
|
||||
|
||||
frame_usage=0.94
|
||||
DESTi=$DEST/chopper_f1_094
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1 \
|
||||
frame_usage=$frame_usage lambda_min=$lambda_min
|
||||
|
||||
frame_usage=0.96
|
||||
DESTi=$DEST/chopper_f1_096
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1 \
|
||||
frame_usage=$frame_usage lambda_min=$lambda_min
|
||||
|
||||
frame_usage=0.974
|
||||
DESTi=$DEST/chopper_f1_097s
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1 \
|
||||
frame_usage=$frame_usage lambda_min=$lambda_min
|
||||
|
||||
frame_usage=0.98
|
||||
DESTi=$DEST/chopper_f1_098
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1 \
|
||||
frame_usage=$frame_usage lambda_min=$lambda_min
|
||||
|
||||
frame_usage=0.99
|
||||
DESTi=$DEST/chopper_f1_099
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1 \
|
||||
frame_usage=$frame_usage lambda_min=$lambda_min
|
||||
|
||||
|
||||
frame_usage=0.98
|
||||
lambda_start=2.75
|
||||
lambda_min=3.75
|
||||
lambda_end=12.75
|
||||
DESTi=$DEST/chopper_f1_375A
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_baseline.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0001 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
lambda_start=$lambda_start lambda_end=$lambda_end enable_gravity=0 enable_chopper=1 \
|
||||
frame_usage=$frame_usage lambda_min=$lambda_min
|
||||
|
||||
|
||||
###################### Reference and Ni-layer measurement 1x1mm² sample ####################
|
||||
|
||||
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEST=../results
|
||||
ncount=1e8
|
||||
use_cores=6
|
||||
sample=1
|
||||
omega=0.8
|
||||
sample_length=0.01
|
||||
sample_height=0.015
|
||||
|
||||
if [ Estia_vs.instr -nt Estia_vs.out ]; then
|
||||
rm Estia_vs.c Estia_vs.out
|
||||
mcstas -t -o Estia_vs.c Estia_vs.instr
|
||||
mpicc -O3 -o Estia_vs.out Estia_vs.c -lm -DUSE_MPI -DUSE_NEXUS -lNeXus
|
||||
fi
|
||||
|
||||
|
||||
omega=2.0
|
||||
DESTi=$DEST/vs_data
|
||||
if [ -e "$DESTi" ]; then
|
||||
rm -r "$DESTi"
|
||||
fi
|
||||
|
||||
mpirun -np $use_cores Estia_vs.out \
|
||||
--dir="$DESTi" --format=NeXuS --ncount=$ncount --gravitation \
|
||||
omegaa=$omega operationmode=0 theta_resolution=0.04 over_illumination=0.0025 \
|
||||
sample=$sample sample_length=$sample_length sample_height=$sample_height \
|
||||
enable_gravity=1 enable_chopper=0 source_power=5
|
||||
|
||||
###################### Reference and Ni-layer measurement 1x1mm² sample ####################
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#SBATCH -J mcEstia_1
|
||||
#SBATCH -N 2
|
||||
#SBATCH --ntasks-per-node=24
|
||||
#SBATCH --time=1-00:00:00
|
||||
#SBATCH --mail-type=fail
|
||||
#SBATCH --mail-user=artur.glavic@psi.ch
|
||||
|
||||
#SBATCH -o stdout.log
|
||||
#SBATCH -e stderr.log
|
||||
|
||||
#SBATCH --partition=ll_long
|
||||
|
||||
echo "Starting at `date`"
|
||||
echo "Running on hosts: $SLURM_NODELIST"
|
||||
echo "Running on $SLURM_NNODES nodes."
|
||||
echo "Running on $SLURM_NPROCS processors."
|
||||
echo "Current working directory is `pwd`"
|
||||
|
||||
/usr/bin/modulecmd tcsh load mcstas
|
||||
bash compile_if_needed.sh
|
||||
|
||||
for y1 in $(seq -0.009 0.001 0.009)
|
||||
do
|
||||
for y2 in $(seq -0.009 0.001 0.009) $(seq -0.09 0.01 -0.01) $(seq 0.01 0.01 0.09) $(seq -0.5 0.1 -0.1) $(seq 0.1 0.1 0.5)
|
||||
do
|
||||
printf -v Y1 %.3f $y1
|
||||
printf -v Y2 %.3f $y2
|
||||
echo $Y1 $Y2
|
||||
/afs/psi.ch/project/sinq/sl6-64/bin/mpirun -np $SLURM_NPROCS Estia_baseline.out \
|
||||
--dir=../results/selene1_geo_$Y1\_$Y2 --ncount=1e9 \
|
||||
omegaa=1.0 sample=4 sample_length=0.00005 sample_height=0.01 \
|
||||
lambda_start=2.5 lambda_end=15.0 enable_gravity=1 enable_chopper=1 \
|
||||
lambda_min=3.75 selene1_foot1y=$Y1 selene1_foot2y=$Y2
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
echo "Program finished with exit code $? at: `date`"
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/bin/tcsh
|
||||
#SBATCH -J mcEstia_S
|
||||
#SBATCH -N 2
|
||||
#SBATCH --ntasks-per-node=24
|
||||
#SBATCH --time=2:00:00
|
||||
#SBATCH --mail-type=fail
|
||||
#SBATCH --mail-user=artur.glavic@psi.ch
|
||||
|
||||
#SBATCH -o stdout.log
|
||||
#SBATCH -e stderr.log
|
||||
|
||||
#SBATCH --partition=ll_short
|
||||
|
||||
echo "Starting at `date`"
|
||||
echo "Running on hosts: $SLURM_NODELIST"
|
||||
echo "Running on $SLURM_NNODES nodes."
|
||||
echo "Running on $SLURM_NPROCS processors."
|
||||
echo "Current working directory is `pwd`"
|
||||
|
||||
#module unload intel
|
||||
#module load intel
|
||||
module load mcstas
|
||||
bash compile_if_needed.sh
|
||||
|
||||
mpirun -np $SLURM_NPROCS Estia_baseline.out \
|
||||
--dir=../results/shielding --ncount=1e9 \
|
||||
sample=0
|
||||
|
||||
|
||||
echo "Program finished with exit code $? at: `date`"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#SBATCH -J mcEstia_2
|
||||
#SBATCH -N 2
|
||||
#SBATCH --ntasks-per-node=24
|
||||
#SBATCH --time=1-00:00:00
|
||||
#SBATCH --mail-type=fail
|
||||
#SBATCH --mail-user=artur.glavic@psi.ch
|
||||
|
||||
#SBATCH -o stdout2.log
|
||||
#SBATCH -e stderr2.log
|
||||
|
||||
#SBATCH --partition=ll_long
|
||||
|
||||
echo "Starting at `date`"
|
||||
echo "Running on hosts: $SLURM_NODELIST"
|
||||
echo "Running on $SLURM_NNODES nodes."
|
||||
echo "Running on $SLURM_NPROCS processors."
|
||||
echo "Current working directory is `pwd`"
|
||||
|
||||
/usr/bin/modulecmd tcsh load mcstas
|
||||
bash compile_if_needed.sh
|
||||
|
||||
for y1 in $(seq -0.09 0.01 -0.01)
|
||||
do
|
||||
for y2 in $(seq -0.009 0.001 0.009) $(seq -0.09 0.01 -0.01) $(seq 0.01 0.01 0.09) $(seq -0.5 0.1 -0.1) $(seq 0.1 0.1 0.5)
|
||||
do
|
||||
printf -v Y1 %.3f $y1
|
||||
printf -v Y2 %.3f $y2
|
||||
echo $Y1 $Y2
|
||||
/afs/psi.ch/project/sinq/sl6-64/bin/mpirun -np $SLURM_NPROCS Estia_baseline.out \
|
||||
--dir=../results/selene1_geo_$Y1\_$Y2 --ncount=1e9 \
|
||||
omegaa=1.0 sample=4 sample_length=0.00005 sample_height=0.01 \
|
||||
lambda_start=2.5 lambda_end=15.0 enable_gravity=1 enable_chopper=1 \
|
||||
lambda_min=3.75 selene1_foot1y=$Y1 selene1_foot2y=$Y2
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
echo "Program finished with exit code $? at: `date`"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#SBATCH -J mcEstia_3
|
||||
#SBATCH -N 2
|
||||
#SBATCH --ntasks-per-node=24
|
||||
#SBATCH --time=1-00:00:00
|
||||
#SBATCH --mail-type=fail
|
||||
#SBATCH --mail-user=artur.glavic@psi.ch
|
||||
|
||||
#SBATCH -o stdout3.log
|
||||
#SBATCH -e stderr3.log
|
||||
|
||||
#SBATCH --partition=ll_long
|
||||
|
||||
echo "Starting at `date`"
|
||||
echo "Running on hosts: $SLURM_NODELIST"
|
||||
echo "Running on $SLURM_NNODES nodes."
|
||||
echo "Running on $SLURM_NPROCS processors."
|
||||
echo "Current working directory is `pwd`"
|
||||
|
||||
/usr/bin/modulecmd tcsh load mcstas
|
||||
bash compile_if_needed.sh
|
||||
|
||||
for y1 in $(seq 0.01 0.01 0.09)
|
||||
do
|
||||
for y2 in $(seq -0.009 0.001 0.009) $(seq -0.09 0.01 -0.01) $(seq 0.01 0.01 0.09) $(seq -0.5 0.1 -0.1) $(seq 0.1 0.1 0.5)
|
||||
do
|
||||
printf -v Y1 %.3f $y1
|
||||
printf -v Y2 %.3f $y2
|
||||
echo $Y1 $Y2
|
||||
/afs/psi.ch/project/sinq/sl6-64/bin/mpirun -np $SLURM_NPROCS Estia_baseline.out \
|
||||
--dir=../results/selene1_geo_$Y1\_$Y2 --ncount=1e9 \
|
||||
omegaa=1.0 sample=4 sample_length=0.00005 sample_height=0.01 \
|
||||
lambda_start=2.5 lambda_end=15.0 enable_gravity=1 enable_chopper=1 \
|
||||
lambda_min=3.75 selene1_foot1y=$Y1 selene1_foot2y=$Y2
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
echo "Program finished with exit code $? at: `date`"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#SBATCH -J mcEstia_4
|
||||
#SBATCH -N 2
|
||||
#SBATCH --ntasks-per-node=24
|
||||
#SBATCH --time=1-00:00:00
|
||||
#SBATCH --mail-type=fail
|
||||
#SBATCH --mail-user=artur.glavic@psi.ch
|
||||
|
||||
#SBATCH -o stdout4.log
|
||||
#SBATCH -e stderr4.log
|
||||
|
||||
#SBATCH --partition=ll_long
|
||||
|
||||
echo "Starting at `date`"
|
||||
echo "Running on hosts: $SLURM_NODELIST"
|
||||
echo "Running on $SLURM_NNODES nodes."
|
||||
echo "Running on $SLURM_NPROCS processors."
|
||||
echo "Current working directory is `pwd`"
|
||||
|
||||
/usr/bin/modulecmd tcsh load mcstas
|
||||
bash compile_if_needed.sh
|
||||
|
||||
for y1 in $(seq -0.5 0.1 -0.1)
|
||||
do
|
||||
for y2 in $(seq -0.009 0.001 0.009) $(seq -0.09 0.01 -0.01) $(seq 0.01 0.01 0.09) $(seq -0.5 0.1 -0.1) $(seq 0.1 0.1 0.5)
|
||||
do
|
||||
printf -v Y1 %.3f $y1
|
||||
printf -v Y2 %.3f $y2
|
||||
echo $Y1 $Y2
|
||||
/afs/psi.ch/project/sinq/sl6-64/bin/mpirun -np $SLURM_NPROCS Estia_baseline.out \
|
||||
--dir=../results/selene1_geo_$Y1\_$Y2 --ncount=1e9 \
|
||||
omegaa=1.0 sample=4 sample_length=0.00005 sample_height=0.01 \
|
||||
lambda_start=2.5 lambda_end=15.0 enable_gravity=1 enable_chopper=1 \
|
||||
lambda_min=3.75 selene1_foot1y=$Y1 selene1_foot2y=$Y2
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
echo "Program finished with exit code $? at: `date`"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
#SBATCH -J mcEstia_5
|
||||
#SBATCH -N 2
|
||||
#SBATCH --ntasks-per-node=24
|
||||
#SBATCH --time=1-00:00:00
|
||||
#SBATCH --mail-type=fail
|
||||
#SBATCH --mail-user=artur.glavic@psi.ch
|
||||
|
||||
#SBATCH -o stdout5.log
|
||||
#SBATCH -e stderr5.log
|
||||
|
||||
#SBATCH --partition=ll_long
|
||||
|
||||
echo "Starting at `date`"
|
||||
echo "Running on hosts: $SLURM_NODELIST"
|
||||
echo "Running on $SLURM_NNODES nodes."
|
||||
echo "Running on $SLURM_NPROCS processors."
|
||||
echo "Current working directory is `pwd`"
|
||||
|
||||
/usr/bin/modulecmd tcsh load mcstas
|
||||
bash compile_if_needed.sh
|
||||
|
||||
for y1 in $(seq 0.1 0.1 0.5)
|
||||
do
|
||||
for y2 in $(seq -0.009 0.001 0.009) $(seq -0.09 0.01 -0.01) $(seq 0.01 0.01 0.09) $(seq -0.5 0.1 -0.1) $(seq 0.1 0.1 0.5)
|
||||
do
|
||||
printf -v Y1 %.3f $y1
|
||||
printf -v Y2 %.3f $y2
|
||||
echo $Y1 $Y2
|
||||
/afs/psi.ch/project/sinq/sl6-64/bin/mpirun -np $SLURM_NPROCS Estia_baseline.out \
|
||||
--dir=../results/selene1_geo_$Y1\_$Y2 --ncount=1e9 \
|
||||
omegaa=1.0 sample=4 sample_length=0.00005 sample_height=0.01 \
|
||||
lambda_start=2.5 lambda_end=15.0 enable_gravity=1 enable_chopper=1 \
|
||||
lambda_min=3.75 selene1_foot1y=$Y1 selene1_foot2y=$Y2
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
echo "Program finished with exit code $? at: `date`"
|
||||
|
||||
Reference in New Issue
Block a user