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

From: Masoomeh Yarmohammadi <myarmohammadi_at_ipm.ir>
Date: Sat, 21 May 2016 19:56:28 +0430 (IRDT)

D ear 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, myarmoha_at_cern.ch

----- Original Message -----
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 > 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 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

**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 - 19:22:57 CEST

This archive was generated by hypermail 2.3.0 : Sat May 21 2016 - 19:22:58 CEST