- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]

From: Ševčik Aleksandras <aleksandras.sevcik_at_ktu.edu>

Date: Tue, 23 Jul 2019 07:27:38 +0000

Dear Sougata Rakshit,

Wonderful, it works indeed!

But may I ask two more moments here:

1) I need to set up the certain values ( 0.2 ) for BEAMPOS WHAT(4) & (5) - direction cosine of the beam with respect to the x & y-axis. It does not take values from the card now when I use this modified routine. What additional line should be included for this?

2) also this code works for angular flat beam only, but not for rectangular flat beam - does the code differs much in such case?

If you or anybody else could find an opportunity to help with this, I will greatly appreciate such help,

Regards

Alex

-----Original Message-----

From: Sougata <sougata_at_barc.gov.in>

Sent: Tuesday, July 23, 2019 07:47

To: Ševčik Aleksandras <aleksandras.sevcik_at_ktu.edu>

Cc: fluka-discuss_at_fluka.org; owner-fluka-discuss_at_mi.infn.it

Subject: Re: [fluka-discuss]: how to include the divergence in the source.f / photons

Dear Alex,

Please note following if it can help you.

cos 200 mrad=0.98007

So we have to randomize direction cosine along beam axis from 0.98007 to 1 (i.e. cos (0 degree) to cos (200 mrad))

you can try following code as

* Cosines (tx,ty,tz)

COSTH = ONEONE-(1-0.98007)*FLRNDM(TTT)

IF(COSTH.GT.ONEONE) COSTH=ONEONE

IF(COSTH.LT.-ONEONE) COSTH=-ONEONE

PHI = TWOPIP*FLRNDM(SSS)

UBEAM=SQRT(ONEONE-COSTH*COSTH)*COS(PHI)

VBEAM=SQRT(ONEONE-COSTH*COSTH)*SIN(PHI)

WBEAM=COSTH

TXFLK (NPFLKA) = UBEAM

TYFLK (NPFLKA) = VBEAM

* TZFLK (NPFLKA) = WBEAM

TZFLK (NPFLKA) = SQRT ( ONEONE - TXFLK (NPFLKA)**2

& - TYFLK (NPFLKA)**2 )

I think it will work.

Regards,

Date: Tue, 23 Jul 2019 07:27:38 +0000

Dear Sougata Rakshit,

Wonderful, it works indeed!

But may I ask two more moments here:

1) I need to set up the certain values ( 0.2 ) for BEAMPOS WHAT(4) & (5) - direction cosine of the beam with respect to the x & y-axis. It does not take values from the card now when I use this modified routine. What additional line should be included for this?

2) also this code works for angular flat beam only, but not for rectangular flat beam - does the code differs much in such case?

If you or anybody else could find an opportunity to help with this, I will greatly appreciate such help,

Regards

Alex

-----Original Message-----

From: Sougata <sougata_at_barc.gov.in>

Sent: Tuesday, July 23, 2019 07:47

To: Ševčik Aleksandras <aleksandras.sevcik_at_ktu.edu>

Cc: fluka-discuss_at_fluka.org; owner-fluka-discuss_at_mi.infn.it

Subject: Re: [fluka-discuss]: how to include the divergence in the source.f / photons

Dear Alex,

Please note following if it can help you.

cos 200 mrad=0.98007

So we have to randomize direction cosine along beam axis from 0.98007 to 1 (i.e. cos (0 degree) to cos (200 mrad))

you can try following code as

* Cosines (tx,ty,tz)

COSTH = ONEONE-(1-0.98007)*FLRNDM(TTT)

IF(COSTH.GT.ONEONE) COSTH=ONEONE

IF(COSTH.LT.-ONEONE) COSTH=-ONEONE

PHI = TWOPIP*FLRNDM(SSS)

UBEAM=SQRT(ONEONE-COSTH*COSTH)*COS(PHI)

VBEAM=SQRT(ONEONE-COSTH*COSTH)*SIN(PHI)

WBEAM=COSTH

TXFLK (NPFLKA) = UBEAM

TYFLK (NPFLKA) = VBEAM

* TZFLK (NPFLKA) = WBEAM

TZFLK (NPFLKA) = SQRT ( ONEONE - TXFLK (NPFLKA)**2

& - TYFLK (NPFLKA)**2 )

I think it will work.

Regards,

-- SOUGATA RAKSHIT / सौगत रक्षित Scientific Officer(D) / वैज्ञानिक आधिकारीक(D) RSSD / आर एस एस डि Bhabha Atomic Research Centre / भाभा परमानु अनुसंधान केंद्र Mumbai-400 085 / मुंबई-400 085 Tel: +91-022-2559 2214/ दूरभाष: +91-022-2559 2214 On 2019-07-23 00:21, Ševčik Aleksandras wrote: > Dear experts, > > I am using the attached source.f to sample the designed photon > spectrum, however, I noticed that BEAM WHAT(3) does not respond to the > values if source routine is activated - just as stated in the manual. > > Is there any "simple" way to make my source beam with divergence 200 > mrad, or only additional piece of code must be included in the > source.f? > > Looking through old forum archives I found similar code for that > purpose: > > Divbm_Sigma = Divbm*0.2 > > CALL FLNRR2 (RGAUSSDIVX,RGAUSSDIVY) > > DIV_VECTORX = RGAUSSDIVX*Divbm_Sigma > > DIV_VECTORY = RGAUSSDIVY*Divbm_Sigma > > TXHLP = TAN( DIV_VECTORX ) > > TYHLP = TAN( DIV_VECTORY ) > > THELP = SQRT( TXHLP*TXHLP + TYHLP*TYHLP + ONEONE ) > > TXFLK (NPFLKA) = TXHLP / THELP > > TYFLK (NPFLKA) = TYHLP / THELP > > TZFLK (NPFLKA) = SQRT ( ONEONE - LTXFLK (NPFLKA)**2 - TYFLK > (NPFLKA)**2 ) > > TXFLK (NPFLKA) = UBEAM > > TYFLK (NPFLKA) = VBEAM > > TZFLK (NPFLKA) = WBEAM > > TZFLK (NPFLKA) = SQRT ( ONEONE - TXFLK (NPFLKA)**2 > > & - TYFLK (NPFLKA)**2 ) > > But simply applying it the code is not compiled, and my lack of > experience with user routines is a big obstacle to move forward from > this point. In addition, my BEAMPOS is defined with WHAT(1)-(WHAT(3) > and also rotation value for WHAT(5) is used. Also the beam is directed > to positive Z direction. > > Could anyone share a similar working source.f file which would > directly use BEAM WhHAT(3) value, or maybe guide me through this > coding problem? > > Both source.f routines - the original and the one I tried to modify - > are attached. > > Thank you very much, > > Rgds > > Alex __________________________________________________________________________ You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_infoReceived on Tue Jul 23 2019 - 10:42:50 CEST

*
This archive was generated by hypermail 2.3.0
: Tue Jul 23 2019 - 10:43:04 CEST
*