Non classé 4. VolcFlow as a script

4. VolcFlow as a script

It is possible to use VolcFlow as a script if you need to run several simulation, in a probabilistic approach for example.

Here, lava source conditions are defined randomly. Simulation are done and data are saved.
At the end, a map is generated. Red color = affected by all the simulations, blue = by just one.

This example shows:
– how to use VolcFlow as a script
– how to use the data for a ‘probabilistic’ approach
– how to stop the calculation once the flow has stopped (uminstop)

Download the files here.

close all
clear all %the use of « clear all » can be necessary
% as it is desactivated when using VolcFlow as a script%these 2 lines force VolcFlow to run as a script
open volcflowfig.fig;
set(findobj(‘tag’,’script’),’string’,0); %initiallises VolcFlow to run as a script
autofilename=‘pavin.m’

for loop=1:5  %VolcFlow will be launched 5 times
    VolcFlow
    dd=sprintf(‘pavin_%d.mat’, loop)
    save(dd, ‘h’)%save the final thickness only
Volume=1e7;

end

%read the data
H=h*0;
for loop=1:5
    dd=sprintf(‘pavin_%d.mat‘, loop);
    load(dd);
    H(h>0)=H(h>0)+13;
end
h=H;
repr_pavin

Print Friendly, PDF & Email
Top