[fluka-discuss]: RE: direction cosines of the normal to the surface

From: Chris Theis <Christian.Theis_at_cern.ch>
Date: Tue, 17 Dec 2013 12:43:43 +0000

Hi Silvia,

it looks as if the common block does not have a valid initialization at the time when you try to retrieve the value.

You could try to call the geometry kernel directly. There is a subroutine called GEONOR which returns the normal at a certain point:

      SUBROUTINE GEONOR ( XA, YA, ZA, U, V, W, NREG, IOLREG, NSURF, UNOR, VNOR, WNOR )

XA, YA, ZA = current particle coordinates U,V,W = particle direction NREG = new region (I think this should be NEWREG in usrmed.f) IOLREG = old region (should be MREG in usrmed.f) NSURF = just put a dummy integer variable here

UNOR, VNOR, WNOR should be the returned variables with the normal.

Hope that helps
Chris



-----Original Message-----
From: owner-fluka-discuss_at_mi.infn.it [mailto:owner-fluka-discuss_at_mi.infn.it] On Behalf Of Silvia Cipiccia
Sent: 17 December 2013 10:20
To: fluka-discuss_at_fluka.org
Subject: [fluka-discuss]: direction cosines of the normal to the surface

Hello,

I'm quite new in FLUKA and I apologize in advance if the my problem results to be trivial.
I am trying to implement x-ray refraction using fluka. I've managed doing it implementing using MAT-PROP to activate USRMED for simple shapes (as a sphere or a cylinder) calculating by myself in USRMED subroutine the normal to the surface at the crossing point.
I would like to implement it for more complex shapes and for this it would be good to have the direction cosines of the normal to the surface at the boundary crossing point directly from FLUKA.
If I understood properly the direction cosines of the normal to the surface should be available including the common (FLKSTK).
What I did to test it is creating a very simple subrouting only to read the direction cosines. I included (FLKSTK) in my USRMED and try to read TXNOR(NPFLKA),TYNOR(NPFLKA),TZNOR(NPFLKA) when crossing the boundary between two different regions. However, the output I get is always TXNOR(NPFLKA)=-2 ,TYNOR(NPFLKA)=0.,TZNOR(NPFLKA)=0.
Did I mistunderstand the meaning of TXNOR(NPFLKA),TYNOR(NPFLKA),TZNOR(NPFLKA) ?
I believe I'm doing something very wrong but I can't spot it.

do you have any suggestion?
I attach my input and subroutines

Many thanks,

Silvia
Received on Tue Dec 17 2013 - 15:06:43 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 17 2013 - 15:06:44 CET