Re: [fluka-discuss]: Fluka-Matlab link

From: Vittorio Boccone <dr.vittorio.boccone_at_ieee.org>
Date: Sat, 21 May 2016 22:07:59 +0200

Dear Masoomeh,
Do use Matlab only to handle the FLUKA loop of your thickness?
If yes please consider a scripting language or the Flair sweeping functionalities.
Matlab loop handling is only useful if you need to use it during the interaction with some other 3rd-party code (i.e. Ansys or LS-Dyna)


Best regards
Vittorio
> On May 21, 2016, at 5:26 PM, Masoomeh Yarmohammadi <myarmohammadi_at_ipm.ir> wrote:
>
> Dear Vittorio, Mary and Marlon,
>
> I wish to make this Matlab link to optimize my target thickness and I want to sweep a range of target thicknesses. I prefer to do it systematic and automatic. I hope the Matlab link with Fluka can help me.
>
> The bash script was useful, many thanks Vittorio. About making a loop for sweeping/scanning the target thickness (for example with 'For' command) which one is more logic: Importing the bash script in Matlab file (m file with Loop command) or inserting the Matlab file (m file) that includes the loop command in the bash script?
>
>
> Thanks again,
> BRegards
> Masoomeh Yarmohammadi Satri
> Post-Doctoral Research Fellow, School of Particles and Accelerator, Institute for Research in Fundamental Sciences (IPM)
> E-mail : myarmohammadi_at_ipm.ir <mailto:myarmohammadi_at_ipm.ir>, myarmoha_at_cern.ch <mailto:myarmoha_at_cern.ch>
>
> From: "Vittorio Boccone" <dr.vittorio.boccone_at_ieee.org>
> To: me_at_marychin.org
> Cc: "fluka-discuss" <fluka-discuss_at_fluka.org>, "Masoomeh Yarmohammadi" <myarmohammadi_at_ipm.ir>
> Sent: Monday, April 25, 2016 11:52:18 PM
> Subject: Re: [fluka-discuss]: Fluka-Matlab link
>
> Here an examples of the bash scripts I used in the past to perform soft LS-DYNA-FLUKA coupling using Matlab as a main loop handler
>
> #!/bin/bash
> export FLUKA=$FLUKA
> export FLUPRO=$FLUPRO
> filename=$1
> cycles=$2
> $FLUPRO/flutil/rfluka -N0 -M${cycles} ${filename}
> # [...]
>
> Merge and convert to ASCII usrbin results such that they could be processed easily by Matlab
> # [...]
> # Merge and convert the USRBIN to ASCII
> ls -1 *.31 > OutputFileList
> echo "" >> OutputFileList
>
> echo "energy_b${bunchID}_${meshType}" >> OutputFileList
> echo "energy_b${bunchID}_${meshType}" > BinToTxt
> echo "energy_b${bunchID}_${meshType}.txt" >> BinToTxt
>
> $FLUPRO/flutil/usbsuw < OutputFileList > LogFile
> $FLUPRO/flutil/usbrea < BinToTxt >> LogFile
> # [...]
>
> Best, V
>
> On Apr 25, 2016, at 9:07 PM, Vittorio Boccone <dr.vittorio.boccone_at_ieee.org <mailto:dr.vittorio.boccone_at_ieee.org>> wrote:
>
> Hi Mary and Masoomeh,
> there are plenty of good reasons why one could lightly couple FLUKA with any other numerical code, as for example to compute variation in the material density in particular region. Ofter Finite-Elements codes for thermo-mechanical studies have a natural Matlab interface.
>
> The important part is to define the correct scripts and locking mechanism to handle the simulation loop.
>
> In our case we performed a soft-coupling FLUKA of with LSDYNA using Matlab in Linux.
>
> Matlab can easily run bash scripts.
> The procedure in not technically difficult but requires a bit of scripting karma.
>
> V.
>
> On Apr 25, 2016, at 3:02 PM, me_at_marychin.org <mailto:me_at_marychin.org> wrote:
>
> Dear Masoomeh,
>
> **Using MATLAB to post-process FLUKA output**
> there is absolutely no problem. The trouble is probably not worth it, unless you
> have exhausted FLAIR's potential, in which case please follow through this
> thread:
> http://www.fluka.org/web_archive/earchive/new-fluka-discuss/7292.html <http://www.fluka.org/web_archive/earchive/new-fluka-discuss/7292.html>
>
> **Running FLUKA via MATLAB**
> I really can't think of any reason for wanting this. Why would one ever wish to
> do that? Are you thinking of some complex parameter-sweeping studies? Even that
> can be accomplished far better using simple shell scripts.
>
> :) mary
>
> On 24 April 2016 at 15:25 Masoomeh Yarmohammadi <myarmohammadi_at_ipm.ir> wrote:
>
>
> Dear All,
>
> Could you please let me how I can make a link between Fluka and Matlab then
> run Fluka via Matlab.
>
> Many thanks in advance,
>
> Masoomeh Yarmohammadi Satri
> Post-Doctoral Research Fellow, School of Particles and Accelerator, Institute
> for Research in Fundamental Sciences (IPM)
> E-mail : myarmohammadi_at_ipm.ir, myarmoha_at_cern.ch
>
> __________________________________________________________________________
> You can manage unsubscription from this mailing list at
> https://www.fluka.org/fluka.php?id=acc_info
>
>
> __________________________________________________________________________
> You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info



__________________________________________________________________________
You can manage unsubscription from this mailing list at https://www.fluka.org/fluka.php?id=acc_info
Received on Sat May 21 2016 - 23:51:46 CEST

This archive was generated by hypermail 2.3.0 : Sat May 21 2016 - 23:51:47 CEST