Re: [fluka-discuss]: From flair to bash script: definition of constants (#define)

From: Thiago Viana Miranda Lima <thiago.vmlima_at_cern.ch>
Date: Wed, 18 Mar 2015 11:20:03 +0000

Hi Ana,

When using flair, it runs the input.py which changes the variable number in the final input that is run by fluka. You can create a script to call that file if you want. An option already available to flair is set a range of values you want that variable to be tested.

Best wishes
Thiago

Sent from my iPhone

On 18 Mar 2015, at 12:16, Ferreira De Almeida Lourenco, Ana <am.lourenco_at_ucl.ac.uk<mailto:am.lourenco_at_ucl.ac.uk>> wrote:


Dear all,


I have been using flair to run my simulations and now I'm running them through a bash script.


In my simulations I define a cylindrical phantom divided in many slabs. The thickness of the slabs is variable and I defined a variable cpl (#define cpl) to vary the thickness of the slabs. An example of my input from flair:

---------------------------------------------------------------------------------------------------------------------

 !_at_what.1=1.0
#define cpl 1


XYP PL1 0.0
!_at_what.1=0.001*cpl
XYP PL2 0.001
!_at_what.1=0.4*cpl
XYP PL3 0.4
!_at_what.1=0.401*cpl
XYP PL4 0.401
!_at_what.1=0.8*cpl

---------------------------------------------------------------------------------------------------------------------


In flair when I change the value of cpl (#define cpl), it automatically changes the thickness of the slabs but when I change it through my bash script (#define cpl), it doesn't. I also tried to change my input to the following example but it does not run:

---------------------------------------------------------------------------------------------------------------------

XYP PL1 0.0
!_at_what.1=0.001*cpl
XYP PL2 0.001*cpl
!_at_what.1=0.4*cpl
XYP PL3 0.4*cpl
!_at_what.1=0.401*cpl
XYP PL4 0.401*cpl
!_at_what.1=0.8*cpl

---------------------------------------------------------------------------------------------------------------------


The error may be in the syntax that I'm using. I checked some fortran tutorials but I am not used to this language and it is not straightforward for me.


Any ideas/thoughts?


Many thanks,

Ana




__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Wed Mar 18 2015 - 13:36:11 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 18 2015 - 13:36:12 CET