Navier-Stokes on matlab (reprise): ifiss 2.2

Follow this link to a useful (and free) matlab code that is basically a PDE solver adapted to common problems like diffusion, convection-diffusion, Stokes flow and Navier-Stokes flow problems (incompressible fluid dynamics).

I am talking about ifiss2.2 or Incompressible Flow & Iterative Solver Software Version 2.2.

There you will read that:

It has built-in multigrid and Krylov subspace solvers and includes a variety of appropriate preconditioning strategies for each problem.

Licence: LGPL

Posted in hydro, Matlab, numerical | 1 Comment

2-D unstructured mesh Matlab generator

MESH2D is a toolbox for the generation and manipulation of unstructured triangular meshes in MATLAB.

High quality meshes can be generated automatically for user defined geometries. These meshes are suitable for subsequent Finite Element Method or Finite Volume Method analysis.

MESH2D is a Delaunay based algorithm with a “Laplacian-like” smoothing operation built into the mesh generation process. An unbalanced quadtree decomposition is used to evaluate the element size distribution required to resolve the geometry. The quadtree is triangulated and used as a backgorund mesh to store the element size data. The main method attempts to optimise the node location and mesh topology through an iterative process. In each step a constrained delaunay triangulation is generated with a series of “Laplacian-like” smoothing operations used to improve triangle quality. Nodes are added or removed from the mesh to ensure the required element size distribution is approximated.

MESH2D is Copyright (C) 2005-2006 Darren Engwirda (d_engwirda@hotmail.com).MESH2D is distributed under the GNU GPL.

Posted in hydro, Matlab, numerical | 1 Comment

2-D Navier-Stokes equations Matlab solver

I am pretty sure that any hydraulic engineer wants to have a code for integrating Navier-Stokes equations over a complex domain. Fortunately there are some cool guys who share their work.This is what Navier-Stokes Solver (Navier2d) is: a Matlab solver of motion of incompressible fluids via a solution of the Navier-Stokes equations in 2-D domains, discretized by unstructured meshes. Only the incompressible equations are solved, so the flow speed has to be sufficiently low (Mach Number < 0.3).

Navier2d includes three options:

  1.  Normal – solves the Navier-Stokes equations for the velocity and pressure fields.
  2. Tracer – as above, but also solves an additional transport equation for a scalar quantity within the flow.
  3. Thermal – as above, but treats the scalar tracer field as the temperature of the fluid and includes buoyancy terms in the momentum equations. This allows the solution of coupled thermal problems (like thermal convection).

In Navier2d no turbulence model is implemented. At high Reynolds numbers this becomes very important, because it is necessary to account for sub-grid scale effects. This limitation can be by-passed reducing the grid size, at least in domain zones where the momentum exchanges are important.

Navier2d supports three Boundary Condition types: known velocities and two outflow types.

You need a mesh generator to create general domains. The same author created a 2-D mesh generator (MESH2D). Details of mesh2D can be found here.

Navier2d is Copyright (C) 2005-2006 Darren Engwirda (d_engwirda@hotmail.com). Navier2d is distributed under the GNU GPL.

Posted in hydro, Matlab, numerical | 1 Comment

Wave Overtopping Manual

State of the art of studies on Wave Overtopping of Sea Defences and Related Structures is finally reported in a manual at http://www.overtopping-manual.com/index.html released in August 2007.

This Overtopping Manual gives guidance on analysis and/or prediction of wave overtopping for flood defences attacked by wave action. It is primarily, but not exclusively, intended to assist government, agencies, businesses and specialist advisors & consultants concerned with reducing flood risk. Methods and guidance described in the manual may also be helpful to designers or operators of breakwaters, reclamations, or inland lakes or reservoirs.

The project is funded in the UK by the Environmental Agency, in Germany by the German Coastal Engineering Research Council (KFKI), in the Netherlands by Rijkswaterstaat, Netherlands Expertise Network on Flood Protection.

Posted in e-book, hydro, oceanography | 1 Comment

Smoothed Particle Hydrodynamics (SPH) in Fortran

Smoothed Particle Hydrodynamics (SPH) is a quite recent computational method developed to simulate fluid flows. Differently from other mathematical models of fluid dynamics, SPH describes the mean from the lagrangian point of view. This means that the fluid is divided into a set of discrete fluid elements, like little balls. Each particle has its own properties (e.g a mass) and it moves according to the interactions with other particles. The result is an impressive collections of particles properties: position, for example.

SPH European Research Interest Community (SPHERIC) is the state of the art of SPH research.

For hydraulic researcher and user, it is now available a SPH Free-surface Flow Solver: SPHYSICS.

FORTRAN code is provided for two and three- dimensional versions of the model. Postprocessing tools for MATLAB visualization are also provided.

I have not tried SPHYSICS yet, but it seems the best way for formalizing the SPH use in Hydraulic Engineering field.

Posted in hydro, numerical, oceanography | 2 Comments

Photovoltaic electricity potential

Italian ecological sensitivity has been finally awaken by the money smell. It’s not a hot news, but recent laws that favour investments in solar photovoltaic and thermal fields has achieved a substantial grow in public attention to this “ecological” theme. When you just drive along our industry areas you will see a bloom of brand new companies selling photovoltaic stuff. Some says that a LCA (Life Cycle Assessment) calculated on nowadays photovoltaic technologies reduce by far the overall (i.e. not strictly financial) competitiveness of such an investment, Continue reading

Posted in energy | Leave a comment

Confined seepage in Matlab

By using Partial Differential Equation Toolbox of Matlab language, I generated a simple problem of confined seepage. To use it

  1. save flow_v2.m (mouse right button and save destination as)
  2. open Matlab;
  3. type pdetool at the Matlab command line;
  4. open saved flow_v2.m.m through pdetool toolbox window.

You’ll see the results in terms of equipotential contour and water velocity field (red arrows), based on Laplace equation and Dirichlet boundary conditions.

Of this example, you can edit:

  • Geometry;
  • Boundary conditions;
  • FEM mesh;
  • Results visualization;
Posted in hydro, Matlab, numerical | 5 Comments

Coastal List

Coastal_list is an e-mail list for coastal engineers. In Oceanographic field, you can find:

  1. Job opportunities;
  2. PhD positions;
  3. Conference calls-for-papers;
  4. References.

But principally it is a way to call for data, information, articles, news about Oceans.

To join Coastal_list you have to subscribe. The service is absolutely spam-free.

Posted in job, oceanography | Leave a comment

Mathematical Modelling of Groundwater Flow (for Engineers)

A Canadian environmental engineer friend of mine asked me a consultancy on Groundwater Mathematical Modelling; water seepage through levees, in his case.

I took this occasion for updating my personal list of softwares (free, partially free, and not free) that perform groundwater calculations.

Details of mathematical models herein described are taken from their own web-sites.

MODFLOW: MODFLOW is the name that has been given the USGS (United States Geological Survey) Modular Three-Dimensional finite-difference Groundwater Flow Model. MODFLOW can represent the effects of wells, rivers, streams, drains, horizontal flow barriers, evapotranspiration, and recharge on flow. Potentiality of MODFLOW is that it can include many other modules to perform specific calculation, e.g. MOC3D a three-dimensional method-of-characteristics ground-water flow and transport model; MODPATH a particle tracking post-processing package; ZONEBDGT a computer program for calculating subregional water budgets. But many others tools are available that can fit your needs. It is widely used 2000 version of MODFLOW, but recently this version was upgraded by 2005 version. The standard version of MODFLOW is public-domain.

SEEP2D: SEEP2D is a 2-D finite-element flow model designed to compute seepage on profile models, such as for earthen dam and levee cross sections. SEEP2D can be used to model confined, partially confined, and unconfined flow situations. For partially-confined and unconfined flow situations, both the saturated and unsaturated flow is simulated and the phreatic surface determined. SEEP2D is a steady-state flow model and it computes the flow value at each node of the finite-element mesh. You have to pay for SEEP2D model. Anyhow it is easy to use: SEEP2D makes few things, but it works well.

Z_SOIL. PC: is a finite element package designed for solving geotechnical problems in two and three dimensions. The program can represent, among others: gravity fields and initial stress conditions, water table and water pressures under steady state or transient conditions, including time dependent boundary conditions, drained and undrained soil conditions, unloading control for convergence analysis in tunnels. In Demo version, Z_SOIL.PC can solve problems unlimited in time but limited in size to: 400 nodes and/or 25 structural elements (beams, trusses, membranes) for 2D problems; 600 nodes and/or 50 structural elements (beams, trusses, membranes, shells) for 3D problems. Prices varies between 2D and 3D version, and for academic and professional users.

GSM: GSM is a comprehensive graphical user environment for performing groundwater simulations. The entire GMS system consists of a graphical user interface (the GMS program) and a number of analysis codes (MODFLOW, MT3DMS, RT3D, SEAM3D, MODPATH, MODAEM, SEEP2D, FEMWATER, WASH123D, UTCHEM). The GMS interface was developed by the Environmental Modeling Research Laboratory of Brigham Young University in partnership with the U.S. Army Engineer Waterways Experiment Station. GMS was designed as a comprehensive modeling environment. Several types of models are supported and facilities are provided to share information between different models and data types. GSM is a nice tool. My favorite, absolutely, above all the last version 6.0. GSM is not for free (see prices). In DEMO mode you can work freely, but you can’t save your project.

In my opinion, the funniest way to model groundwater flows is implementing your own code, e.g in Matlab language. Just Matlab has the Partial Differential Equation Toolbox (PDE), an environment for the study and solution of partial differential equations in two space dimensions and time. The equations are discretized by the Finite Element Method (FEM). An easy-to-use Graphical User Interface (typing pdetool at the Matlab command line) completes this Matlab toolbox.

Posted in hydro, Matlab, numerical | 1 Comment

Sun in 3D

Have you ever seen Sun in 3D? NASA’s Stereo mission is taken picture in 171 Angstrom wavelength of extreme ultraviolet light from two different satellites to build 3-D solar shape by using stereo reconstruction. Main purpose is to reveal the 3D structure of coronal mass ejections, that affects satellites functionality and life on planet earth.

NASA publishes video and images of 3D stereo reconstruction of Sun. NASA suggests also how to make by your own 3D glasses to visualize our star’s perspective.

3D solar sequences are incredible!

Posted in image analysis | Leave a comment