

Results validate the use of the free and open platform OpenFOAM as a viable alternative to commercial ones in the domain of fishway design and assessment.

Both platform codes reproduced the scenario under study, concurred with experimental data and offered a superior performance on flow structure velocity simulation than turbulent kinetic energy. Mesh independency was assessed through LES IQ index and the numerical models' accuracies were evaluated comparing representative hydraulic variables (velocity, its components, and turbulence kinetic energy) with ADV experimental data and discussing results in previous studies. In this study, in contrast to previous comparative studies, turbulence was addressed using LES approach and the volume of fluid method was used to model the multiphase interface (air-water). Considering previous comparative studies, our initial hypothesis is that both OpenFOAMs' multiphase solver and FLOW-3D provide good comparable results. = pol2cart( a, ones(1,n) ) = pol2cart( b, 0.The objective of this study is to make a comparison between two 3D CFD platforms: OpenFOAM (free and open-source CFD software) and FLOW-3D (closed source commercial CFD software), focusing on vertical slot fishways, one of the most widespread solutions to facilitate the fish migration through transversal obstacles in rivers. % Set up some demo values for plotting around a circleĭt = 0.05 a = 0:dt:2*pi+(dt*nFade) n = numel(a) b = a.*4 Here is the code, see comments for details: % "Buffer" size, number of historic lines to keep, and governs the
#MATLAB 2018B VS 2018A UPDATE#
Create a fixed n lines and update their position, rather than creating a growing number of lines.This answer offers a different approach for line drawing which has no compatibility issues (these two 'features' could be implemented independently): My 1st answer uses the undocumented (and as of 2018b, depreciated) transparency option for lines. I'm adding a 2nd answer to clearly separate two completely different approaches. I included the deletion of barely visible lines, as suggested by (my own, perhaps less elegant implementation)Īnd here a demonstration of a quick release mechanism:

% exclude deleted line from loop, so edgealpha is not P(j).EdgeAlpha = p(j).EdgeAlpha*alpha_fraction % Update the alpha to be a fraction of the previous alpha value % when it still exists (delete from that index) % loop over all the previous created lines up till this iteration % only do when first line is already plotted % set alpha of line to fraction of previous alpha value P(i) = patchline(x,y, 'linewidth', 1, 'edgecolor', 'k') % create line with transparency using patchline to keep track of which lines are already deleted % looping variable to prevent deleting and calling already deleted lines Since the fourth color parameter as alpha value is no longer supported in Matlab 2018a (and apparently was never supposed to as Cris Luengo pointed out), here a solution that works in Matlab 2018a using the patchline function from the file exchange (credits to Brett Shoelson). Solution for Matlab 2018a or later (or earlier, later than 2012a at least) Got enough upvotes to motivate making a slightly more fun demo.

You can do this by modifying the 4th Color attribute of past lines.
