Monday, January 18, 2010

CFD Simulations: Matlab Usage / Coding / Applications ...

Over time, there has been increasing discussions on whether or not other commercial softwares be used to program CFD and post process calculations...for example: use of Matlab (Matlab: A Practical Introduction to Programming and Problem Solving). In this blog, I will try to post links and articles - which uses matlab for CFD (/ general numerical) calculations.

Website maintained in the mech and material science dept., oregon

http://web.cecs.pdx.edu/~gerry/class/ME448/codes/

has some nice listing of matlab codes for 1D, 2D finite volume based calculations !! A nice start for beginners and others who look to use Matlab for their scientific needs.

Discussions in the good groups on whether or not Matlab could be used in the CFD world was interesting:

http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/09dae3365cd4fa39

How about some nice shallow water modeling (CFD) using matlab: The file is available for download from the matlab central server

http://www.mathworks.com/matlabcentral/fileexchange/17716

I found a paper on

1. CFD graphical interface using Matlab: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.90.3658&rep=rep1&type=pdf

2. 2D Airfoil optimization using CFD (matlab based) : http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.108.854&rep=rep1&type=pdf

3. Thesis work: CFD program to model pressure distribution of melt flow using Matlab

http://www.me.umn.edu/~td/Lewandowski-Thesis.pdf

4. Discussions on SIMPLE algorithm in Matlab

http://www.mathworks.de/matlabcentral/newsreader/view_thread/246199


In the pre-processing segment, the use of matlab has been extensive as well:

1. DistMesh: a simple mesh generator using matlab can be found here (http://www-math.mit.edu/~persson/mesh/) . Nice application for unstructured triangular and tetrahedral meshes.

2. Gridgen: a matlab based orthogonal grid generator to construct orthogonal curvilinear grids is available here.

http://woodshole.er.usgs.gov/operations/modeling/gridgen/

The gridgen site has tutorials and details for download and installation.

3. The cornell based QMG package does finite element mesh generation in two and three dimensions

http://www.cs.cornell.edu/home/vavasis/qmg-home.html

For some fundamental functions usage and programming for coding the entire CFD structure or in parts (pre / post processing) these books may be helpful.

1. MATLAB Programming for Engineers
2. An Introduction to Programming and Numerical Methods in MATLAB
3. Engineering Analysis: Interactive Methods and Programs with FORTRAN, QuickBASIC, MATLAB, and Mathematica

Multiphase Modeling: Eulerian-Eulerian simulations / applications

Simulation of multi-fluid flows (Multiphase Phenomena and Cfd Modeling and Simulation in Materials Processes) are often complex and requires complex mathematical treatment at the interfaces defining the fluid boundaries. Modeling the interfacial effects have been the core research for multi-fluid researchers. Often, a typical multi-scale phenomena that needs to be simulated is broken down into different zones identified by the acting scales and then "modeled" based on the acting physics. The work is still on-going but has definitely met with a lot of success and is often the default setting in major industrial practices [Comparison of different model approaches for the simulation of multiphase processes [An article from: Atmospheric Environment]).

I have come across the smash-project some time ago and thought this post on multifluid modeling will get a good facelift starting with a decent description of this modeling project.

http://ralyx.inria.fr/2006/Raweb/smash/uid7.html

As stated in their website: "Smash is a common project between INRIA and the University of Provence. The main topic of our project focuses on problems related to mathematical and numerical modeling of heterogeneous flows such as multiphase media, granular materials or reactive flows with mass transfer" presents a good description of the team goal. The website contains in-depth details of the applied methods (with assumptions yes..., mathematical treatment and aspects of parallel / grid computing)

Theses work following this project are listed here

http://ralyx.inria.fr/2006/Raweb/smash/uid70.html

and publication description: http://ralyx.inria.fr/2006/Raweb/smash/bibliography.html

With reference to multi-fluid flow modeling and numerical analysis, the work of the Center for Risk studies and safety is a must read.

Their website http://www.crss.ucsb.edu/ gives a complete picture of the their code MUSIC and associated publications and presentations made at major conferences and journals.

The link: http://www.crss.ucsb.edu/music/LEVEL0/ lists all their publications and reports...i had bookmarked their information several years back and continue to look at their recent development in numerical analysis.

The papers (on multifluid analysis) from the 6th int. conf on CFD (Norway) can be downloaded from

http://www.sintef.no/Projectweb/CFD2008/Papers-from-CFD2005/Multifluid-flow-analyses/

I noted some papers which can be used for referencing and for extracting some finer numeric details while performing multifluid calculations include

1. Simulation of flow behavior in bubble column:
http://www.sintef.no/project/CFD2008/CFD2005_papers/36_Zhang_Deen_Kuipers.pdf

2. CFD modeling in gas fluidized beds

http://www.sintef.no/project/CFD2008/CFD2005_papers/42_Yusuf_Melaaen_Mathiesen.pdf

(Take a look at another papers on CFD work on fluidized bed:
http://www.scansims.org/sims2001/SIMS2001/Papers/Paper01-%20B.Halvorsen%20(SIMS_BrittHalvorsen).doc)


3. 2D/3D investigations of dispersion and mass transfer coefficients in a Eulerian multifluid model

http://www.sintef.no/project/CFD2008/CFD2005_papers/53_Guenther_Breault.pdf

4. Evaluation of num methods for solving population balance eqn

http://www.sintef.no/project/CFD2008/CFD2005_papers/45_Dorao_Jakobsen.pdf

There are several other nice papers available in the area of Environment/Combustion, fundamental methods and validation, some aspects of industrial CFD, oil and gas systems..

Nice application : Cyclone separators (gas-liquid) type

http://tustp.org/publications/cfd_bubble_carry_under_98.pdf

I normally tend to download the entire directory and keep it in my repository for future references ..even if i dont need them now. These papers are worth looking at and most of the time saves us lot of times when modeling similar to these are required to be computed.

For all those looking at ( or working with ) multifluid methods, the following paper can definitely be considered as a bible ;)

http://www.dtic.mil/cgi-bin/GetTRDoc?AD=ADA410325&Location=U2&doc=GetTRDoc.pdf

Also, Kunz's paper: http://www.personal.psu.edu/rfk102/PROF/JCPpaper/jcpfinal.pdf

Other publications of interest

1. http://www.cimec.org.ar/ojs/index.php/mc/article/view/2827/2764 (CFD in Trickle bed reactor)

2. http://www.sintef.no/units/matek/2420/242025/ (Nice presentations on multifluid - granular flow etc!)

3. http://www.opensourcecfd.com/conference2008/media/proceedings/OSCIC-08_CarneiroJoao.pdf (openFoam based polydispersed flow modeling)

4. http://www.cfd.com.au/cfd_conf99/papers/030LIOV.PDF (free surface flows in metallurgical vessels)

5. http://www.nea.fr/html/nsd/reports/2007/nea6298/Technical_Session_B1_Advanced_Reactors/7-Kanghs_PWR.pdf (CFD : subcooled flow under high steam flux)

I would post some more research articles that is focused on 1. Numerics 2. Applications.

Some nice books for reference on MP flows validation and application:
1. Improvements in multiphase flow measurement.(Measurement Matters)(Column): An article from: Pipeline & Gas Journal
2. Fundamentals of Multiphase Flow
3. Computational Methods for Multiphase Flow
4. Multiphase Flow Dynamics 3

If you have any queries or publications that you think should be posted in this regard, kindly let me know. Sharing the knowledge is the only way to excellence !!

Friday, January 15, 2010

CFD Simulations (Animations ?)

I came across nice animations of free surface flows from the CFD team of Dr. Veldman (http://www.math.rug.nl/~veldman/)

The familiar droplet bouncing problem treated by the CFD group is shown below.




The work on 3D dambreaking problem is shown below.



The website for downloading some impressive videos on Free surface flows can be found at
http://www.math.rug.nl/~veldman/cfd-gallery.html


Sample simulations of Free surface modeling is also available in the Univ Iowa website
http://www.engineering.uiowa.edu/fluidslab/gallery/ani-num-sim.html

A sample video downloaded from their site is posted here.

Flow over a Weir



An fire simulation is also available in the groups' site







Materials on : An introduction to CFD is available in their main page
http://www.engineering.uiowa.edu/%7Efluids/Lab/CFD_lecture_2003.ppt

Other handouts can be downloaded from
http://www.engineering.uiowa.edu/fluidslab/numsim/handouts.html


An virtual album of fluid flow can be viewed at : http://www.featflow.de/album/contents.html

These videos are copyrighted and have been posted here for educational purposes only. You can contact the respective institutions for further information.

Thursday, January 14, 2010

Fluent UDF Programming : Guides / References to User Defined Function Implementation

An guide to programming in Fluent can be found from the Stanford site

http://www.stanford.edu/class/me469b/handouts/programming.pdf

with details of data structure (Data Structures Using C), variable macro description and usage, journal files, batch execution, automatic adaptation, optimization (including procedure). A good reference that comes handy.

The complete Fluent 6.3 manual for UDFs can be downloaded from

http://www.hipecc.wichita.edu/pdfs/fludf.pdf

With this file, it should be straightforward to create and work on your own physical/numerical modeling.

I came across this CFD FAQ in

http://old.blog.edu.cn/user2/bubujia/archives/2006/1429952.shtml#My_UDF_won.27t_interpret_or_compile_-_what_is_wrong.3F

describing typical user conversations on errors, not able to interpret/compile UDFs similar to CFD-online discussions. Some details are nicely explained and makes sure that we know what we are doing !

Found this thesis: http://www.lib.ncsu.edu/theses/available/etd-04182004-190446/unrestricted/etd.pdf#109
with some nice UDF implementation for properties and coupling with FIDAP.

udf Usage for modeling evaporation (Assessment of convection, conduction, and evaporation in nucleate boiling (NASA technical note)), mass transfer etc : http://scholarsmine.mst.edu/thesis/pdf/Vusirikala_09007dcc80446043.pdf

udf usage for particle trapping: http://upetd.up.ac.za/thesis/available/etd-10072005-095941/unrestricted/03appendicesG-H.pdf

udf usage for momentum source : http://upetd.up.ac.za/thesis/available/etd-01242006-100142/unrestricted/06back.pdf

udf for predicting particle deposition frequency: http://deposit.ddb.de/cgi-bin/dokserv?idn=987091190&dok_var=d1&dok_ext=pdf&filename=987091190.pdf

udf for predefined pictch heave motion : http://www.esru.strath.ac.uk/Documents/MSc_2006/glynn.pdf

udf for calculation of second law of thermodynamics (really nice one!)

http://txspace.tamu.edu/bitstream/handle/1969/1324/etd-tamu-2004C-2-AERO-Chambers.pdf?sequence=1

UDF for varying CFD boundary conditions + stratified energy storage:
: http://130.15.126.37/bitstream/1974/5178/1/Rysanek_Adam_M_200909_MScE.pdf


UDF : setting target mass flow rate in pressure outlet, and some matlab data processing routines.
https://qspace.library.queensu.ca/bitstream/1974/5128/1/Hu_ZhengYu_200909_Master.pdf

UDF listings for source terms implementation:

http://www.wpi.edu/Pubs/ETD/Available/etd-010907-142804/unrestricted/StRock.pdf


UDF's for calculating temperature dependent properties of single species and mixture

http://e-collection.ethbib.ethz.ch/eserv/eth:29781/eth-29781-01.pdf

Nice UDF implementation for Chemical Vapor deposition modeling !

http://dspace.library.drexel.edu/bitstream/1860/344/8/iskenderova_thesis.pdf

Wednesday, January 13, 2010

CFD Softwares: Other than Standard Commercial ones...

Among the list of several CFD vendors / Application programs that we normally come across the internet, few programs caught my attention with respect to its user-friendly nature and ease with which it can be incorporated into a fundamental CFD curriculum.

1. EasyCFD (http://www.easycfd.net/)

Quicknote: An simple CFD software tool for the numerical simulation of two-dimensional fluid flows in a boundary fitted structured grid. (predictions like Two-Dimensional Separated Flows, Study Of Abrupt Transitions in Two-Dimensional Flows: A Singular Perturbation Approach etc can be done)

The code is mainly oriented for didactic or educational purposes, it may become a valuable tool for a first analysis in practical situations. Contact and Download available in the home page.

Some features listed in the website include

· Laminar or turbulent flow
. Conduction in solids and conjugate heat transfer ( Theory of Periodic Conjugate Heat Transfer)
· Isothermal or non-isothermal flow (Incompressible Flow and the Finite Element Method, Volume 1, Advection-Diffusion and Isothermal Laminar Flow)
. Multicomponent fluid flow (Multicomponent Flow Modeling (Modeling and Simulation in Science, Engineering and Technology))
· Steady-state or transient flow
. Transport of passive scalars (eg. smoke, Transport of passive scalars in turbulent channel flow (SuDoc NAS 1.15:89463) )
· Numerical grid generation(Geometry and Topology for Mesh Generation (Cambridge Monographs on Applied and Computational Mathematics))
. Geometry import from DXF or point data files

Pre-processing (meshing, import of files..) and post-processing (contour plots, vectorial rep,
statistical data extraction features) are nicely done.

2. FluidFlow (http://www.fluidflowinfo.com/FluidFlow/FluidFlow.asp)



original software program for the design and optimization of pipe networks, transporting compressible, incompressible, gas-liquid two phase, settling slurries or non-Newtonian fluids.



The code looks pretty effective for product is used succesfully in many diverse industries to model new and existing systems, size pipes, select boosters, controllers and other fluid equipment (Fluid Dynamics Of Industrial Equipment: Flow Distribution Design Methods).

This is a definite piece of software - designers - should be looking at!! New release information and contact info are available in the website .

3. ChannelFlow

http://www.channelflow.org/dokuwiki/doku.php

A C++ based software system for numerical analysis of the incompressible Navier-Stokes flow in channel geometries. Core idea is based on Spectral CFD algorithm for integrating NS eqns (Spectral/hp Element Methods for CFD (Numerical Mathematics and Scientific Computation)) . It is based on Flexible Object oriented programming concept. Classes act as building blocks for presenting particular channel flow models, and associated data analysis.

Nice description of the code set up is avaiable in the home page.


4. Enzo (an open-source cosmological simulation code that uses an adaptive mesh)

http://lca.ucsd.edu/portal/software/enzo

an adaptive mesh refinement (AMR), grid-based hybrid code (hydro + N-Body) which is designed to do simulations of cosmological structure formation (For those astro-physicists / computational /mechanical engineers !)Cosmological Inflation and Large-Scale Structure

The code - Enzo - has been parallelized using the MPI message-passing library and can run on any shared or distributed memory parallel supercomputer or PC cluster. Simulations using as many as 1024 processors have been successfully carried out on the San Diego Supercomputing Center's Blue Horizon, an IBM SP.

5. FLASH (free for non-commercial use, adaptive mesh, compressible solver for astrophysical flows)

http://flash.uchicago.edu/website/home/

Code support/mailing lists and research pages are available in the website.

Take a look at the movie based on convection simulation below (available in their website).



(http://flash.uchicago.edu/website/groups/compphys/dns_burn/movies/chaos_v01.mpg)

Other nice problems on flame propagation, burning in shear flow etc are well noted.

6. CFD Studio (Educational program to study CFD Problems)

http://www.sinmec.ufsc.br/cfd/doc/uk/uk/index.html

is an application to solve 2D CFD problems. It contains a basic mesh generator, a numeric method that solves the conservation equations and it has also a data visualization. The software uses the finite volumes method in generic coordinates. A snapshot of the website is shown here.

Suite contains:
. CFD Studio solver
. CSFL-Lib - CFD C++ classes
. CFD Mesh - 2D mesh creator from complex geometries
. CFD Grid Editor - Edit 2D simple mesh using easy click approach.
. CFD SciView - visualization of meshes, scalar, vector fields obtained by the runs.

Several emerging codes, similar to those discussed here, have already started making some good impressions among the researchers in both academia and industry with some good comparisons in the results produced (Data for Validation of Cfd Codes (Fed; Vol. 146)). Its now a matter of when would these "opensource" applications would take over the commercial ones !

I am looking for similar opensource codes for adding to my repository...kindly advice me on something that you come across..happy openSourcing !!

Tuesday, January 12, 2010

CFD Simulations : Boiling Channel Flows Num Simulations / Experiments

Boiling channel/tube flows is one of the foremost process where use of multiphase modeling comes in handy. Several researchers have devoted their time and money in developing/adjusting the existing MP models specifically suited for their specific needs such as - to simulate MP flows in boiling chambers, nuclear reactors, tubes and containers to name a few (Boiling Heat Transfer And Two-Phase Flow (Series in Chemical and Mechanical Engineering), Boiling Heat Transfer and Two-Phase Flow). As a result, there are numerous publications in this area and to add, most of them are unique in their own way, in a sense that, each article provides a different insight into the modeling criteria and the assumptions used to treat the process.

Modeling in convective-in-tube systems: http://www.tibtd.org.tr/2009-1/107-116.pdf

MP Boiling applications find extensive use in microscale heat transfer flows and eventually help in designing systems to relieve vapor clot, removing bubbly flow altogether or enhancing it, modulating the curvature of the flow for better heat transfer characteristics etc..(Heat Transfer in Boiling Metals by Natural Convection, Boiling Heat Transfer: Modern Developments and Advances)

The article http://www.d43d.com/D43D_09_presentations/Thome_Tutorial.pdf?PHPSESSID=5adc3d3f7d7c3d481c15730a0a9a7dcd
presents a good review of the fundamentals of microscale flow heat transfer.

Also, note, a experimental study for one's numerical validation: Experimental work on saturated flow boiling in micro channels

ftp://131.204.110.10/pub/hejingl/Course/Boiling%20and%20Condensation/Research%20paper/EXPERIMENTAL%20STUDY%20ON%20SATURATED%20FLOW%20BOILING%20CRITICAL%20HEAT%20FLUX%20in%20MC.pdf

I found the work by Dr. Mudawar on flow boiling heat transfer in microchannels : development of two-phase flow model quite interesting..Take a look here

http://www.me.hawaii.edu/Qu_res/paper%20pdf/P-J-07.pdf

PhD work by Dr. Geisler in the area of buoyancy driven 2phase flow and boiling heat transfer in channels,

http://www.me.umn.edu/~kgeisler/Geisler_PhD_abstract_contents.pdf

gives a nice review of the modeling and experiments.

Also, find a good review of flow instabilities arising in boiling 2phase flow in natural circulation systems

downloads.hindawi.com/journals/stni/2008/573192.pdf

Find Several Journal papers of Dr. Kandlikar's group doing heat transfer studies (multiphase experiments)

http://www.rit.edu/kgcoe/mechanical/taleme/Papers/

Find multiple journal articles available for download from the Multiphase lab from Israel inst of tech.

http://multiphaselab.technion.ac.il/2000.htm


I am quite thrilled by the use of mp models for boiling purposes. For ex. treatment of wall heat flux using RPI boiling model, to convert Q to Twall is a nice procedure. These are modeling innovations one must definitely appreciate.

For a quick review on boiling heat transfer models / applications: I, on most occasions, look to the WLV handbook. It has been quite useful in providing you with quick information that one would otherwise have to obtain using advanced text books.

http://www.wlv.com/products/databook/db3/data/db3ch9.pdf
(Chapter on boiling heat transfer on external surfaces)

Another favorite handbook of mine is

http://www.unene.ca/un702-2005/lectures/C-HeatTransferandFluidFlow.pdf

- has nice descriptions of boiling heat transfer with quick graphs, plots, brief theories, heat transfer correlations and schematics for easy understanding..

Other applications of boiling heat transfer:

http://serve.me.nus.edu.sg/mpelps/Publications/Lee_Garimella_IJHMT_2007.pdf
(boiling heat transfer in silicon microchannel arrays)

CFD modeling of subcooled flow boiling in nuclear sector (CFX software) - the article contains description of the forces, numerical treatment of the heat transfer problem etc..

http://www.djs.si/proc/bled2005/htm/pdf/0140.pdf
http://www.nea.fr/html/nsd/reports/2007/nea6298/Technical_Session_A7_Boiling_Models/37-Koncar.pdf
(contains forced convective boiling in channels)



Subcooled boiling near wall http://www.osti.gov/bridge/servlets/purl/821308-lStCwl/native/821308.pdf

Modeling liquid velocity near wall during boiling flow ftp://ftp1.cadhome.cn/CAE/HEAT/ASME2005/HT2005-72182.pdf

If you have any specific paper/work that you would like me to add here, kindly let me know.

CFD multiphase simulations : Eulerian-Lagrangian type

Modeling of multi-fluid flows is a complex task. Especially, identifying if the presented multiphase system can
be modeled with dilute particle or otherwise, can sometimes be a daunting task. Lagrangian type flows are normally encountered in spray simulations, in fluidized bed or even in snow transport applications as pointed out by a CFD-Online user.(Information on the treatment can be found in Intermediate Dynamics for Engineers: A Unified Treatment of Newton-Euler and Lagrangian Mechanics and/or Theory & Problems of Lagrangian Dynamics With a Treatment of Euler's Equations of Motion, Hamilton's Equations, & Hamilton's Principles, )

http://www.cfd-online.com/Forums/fluent/71643-discrete-phase-modeling-coupled-uncoupled.html

The formulation of Eulerian multi-fluid approach is much complex in comparison to the Euler-Lagrangian type work.This is primarily due to the fact that more interaction at the continuum level is expected out of the former,and in the latter, complexities may occur based on the coupling that one seeks: one-way to four-way coupling.


For those who are working on model-picking and in the stage of deciding to go with Euler-euler or Euler-
Lagrangian type: This observation may be of help.

http://www.netl.doe.gov/events/06conferences/mfr_workshop/SummaryT3.pdf

The issues in Eulerian-Lagrangian simulation of complex transport of multiphase flow is elaborated in the following presentation.

http://wiki.siam.org/siag-gs/images/d/df/Russell.pdf

In particular, the presenation above discusses the use of Lagrangian advection, and adjoint characteristics of the variables. Detailed conceptualtopics are well dealt. Nice to have this reference while writing a journal!

Several aspects of dealing with the multiple scales in Multiphase flows while modeling using Euler-Lag type situation is presented here.

http://www.cmla.ens-cachan.fr/fileadmin/Documentation/Prepublications/2009/CMLA2009-10.pdf


A nice research article on Euler-Lagrangian modeling to simulate particulate flows can be found from
the archives of stanford research division:

http://ctr.stanford.edu/ResBriefs03/apte_mahesh_lundgren.pdf

Details of atomization simulations  using Eul-Lag methods can be obtained from Atomization simulations using an Eulerian-VOF-Lagrangian method (SuDoc NAS 1.26:201983) or A coupled Eulerian/Lagrangian method for the solution of three-dimensional vortical flows (SuDoc NAS 1.26:196785)

Presentation on modeling multi-phase flows with underlying assumptions is also available.


http://www.chalmers.se/am/SV/forskning/forskningsavdelningar/stromningslara/siamuf/seminarium-arkiv/seminarium-oktober-2006/downloadFile/attachedFile_9_f0/Modelling_of_multiphase_flows.pdf?nocache=1202900513.0

The multiflow : a fully coupled multiphase flow solver provides some introduction to multiphase applications

http://www.multiflow.org/node/3


similar to a STAR intro: http://www.cd-adapco.com/press_room/dynamics/18/eulerian.html

Fluent stuff: www.bakker.org/dartmouth06/engs150/14-multi.ppt


For someone trying to use Euler-Lagrangian type particulate affair: this publication may be a good reference.

http://www.iahr.org/publications/assets/jhr38-5/Yeganeh_Gotoh_Sakai.pdf

Influence of Eulerian multiphase model parameters on the runs for a spouted bed grain dryer ? is nicely available from this journal article

http://www.task.gda.pl/files/quart/TQ2008/01-02/tq112e-e.pdf

For those industrial guys looking at CFD as an option, the article here may suggest why?

http://www.processinnovation.com/pdf/Multiphase_CFD.pdf

This book Multiphase reacting flows: modelling and simulation (CISM International Centre for Mechanical Sciences) provides a good understanding of the reacting multiphase flows with elaborate simulation examples.

Applications of Eulerian-Lagrangian modeling is quite prominent in the industrial settings where a compromise has to be made between the computational time vs computer resources in order to make quick decisions.