Capillary Race In Circular Tubes Using OpenFOAM

2y ago
26 Views
4 Downloads
4.50 MB
51 Pages
Last View : 18d ago
Last Download : 2m ago
Upload by : Josiah Pursley
Transcription

“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyenngmaduc@gmail.comMarch 22, 20141Tutorial OverviewThis tutorial presents two major topics: the introduction to OpenFOAM, a well-known opensource CFD code, and the instruction for using it to obtain numerical results and visual simulationto fluid mechanics problems. In the first part, an introduction to OpenFOAM is presented andfollowed by the instruction to build OpenFOAM framework on a personal computer. Next, thestandard steps to achieve simulation are presented from pre-processing, setting up and controllingthe solver to post-processing. These tasks are done by a set of open-source tools and utilities such asSalome, Paraview, PyFoam, etc. which are also covered in this tutorial as part of the OpenFOAMFramework. The fluid mechanics problems for simulation in this tutorial is the phenomenon ofliquid column rising in square tubes with different side length in micro gravity environment. Thisproblem is inferred in this tutorial as “Capillary Race” problem. Following the tutorials, thenumerical results and visual simulation are obtained to compare with the experimental data usingdrop tower mentioned in [16].2Introduction to OpenFOAM FrameworkOpenFOAM [8] is an open-source CFD toolbox started in 2004. The code was initially developedlate 1980s at Imperial College and now is distributed by OpenFOAM foundation and maintainedby ESI group, a French-based CAE software company. OpenFOAM is a set of solvers and utilitiesprimarily for CFD with capabilities of standard tasks of CFD working flow from pre-processing,solving and post-processing. OpenFOAM solves wide-rage of problem from incompressible flow,heat transfer to turbulence modeling and fluid structure interaction; it is also not limited to fluidmechanics and is being developed as general modelling platform including mutltiphysic simulation,numerical analysis and differential solver. For the last decade, OpenFOAM has recently raised itspopularity with a vibrant user base as can be shown in Figure 1 showing the OpenFOAM downloadfor countries around the world.Figure 1: OpenFOAM download for countries around the world1

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen“Today, OpenFOAM is a proven player in commercial CFD and academic research” [12], saidHrvoje Jasak, main creator of OpenFOAM and also Director of Wikki Ltd., a UK-based OpenFOAM Consultancy said in the 6th International OpenFOAM Workshop [9], Penn State Universityin 2011. The OpenFoam workshop has been annually held since 2006 visting 6 countries in 3 continents. Main users of OpenFOAM include industrial CFD consultancies, academic institution,community. According to extend-project.de [3], the major OpenFOAM community, around 50groups are active around the world using and developing OpenFOAM as the main research and/orservices. Several groups with details information are listed in Appendix A of this tutorial. Thecontributions of users from these vibrant community such as creating and sharpening solvers forOpenFOAM are frequent, many are on monthly basis; this strengthens the power OpenFOAM.In this tutorials, an example of using OpenFOAM for CFD purpose is introduced. OpenFOAMcore package is combined with third party tools for enhancing CFD work flow of OpenFOAM.This approach is so-called in this tutorial as OpenFOAM Framework and is described Figure 2.Open-source enables OpenFOAM to couple with numerous third-party enhancing tools includingalso optimization tool such as DAKOTA [6] and high quality rendering tools such as Blender [2]which go beyond the regular scope of CFD work flow. This tutorial introduces several tools andchoose some of those as the tools to solve the problem in this tutorial and to detail the instruction. SALOME [11], a well-known CAE platform, is used for pre-processing, ParaView [10], alsoa well-known visualization program for post-processing, matplotlib [7] for plotting, built-in OpenFOAM utilites and Python program such as PyFoam [4] and swak4Foam [5] for manipulating theOpenFOAM solver. Appendix B provides a description of several notable tools to work withinOpenFOAM framework. This tutorial opens the door for users to open-source code world andlearning opportunities of UNIX, python, C programming, and code development. It also fostersusers understanding of the underlying algorithms and computation for numerical simulation.Figure 2: OpenFOAM Framework Structure2 of 51

ME4483“Capillary Race” in Circular Tubes using OpenFOAMDuc NguyenThe “Capillary Race” OverviewThis subject of this tutorial is simulation of sudden capillary rise in families of cylindrical tubesin micro- gravity environment during drop tower experiments. Such experiments typically consistof a fluid filled chamber mounted to an experiment rig which is then dropped while a high-speedcameras captures the response of the fluid. The experiment corresponding to this tutorials is part ofthe meticulous and tremendous research by Wollman [16] using novel Dryden Drop Tower at PSU.It features four cylindrical tubes with 2.9, 3.8, 7.1 and 10.8 mm of ID with length of 160 mm eachpartially submerging width depth of 10mm in PDMS that fills a reservoir. These four cylindersthen experience 2s drop test in which the capillary forces dominate driving the rise. The rate ofthe rise is different so that synchronization the video of these rises looks like a “Capillary Race” asshown in Figure 3. The rate of capillary rise has been studied using analytical method by Washburn[15] while digitized values from experiments for the rise height of the bulk meniscus are used byWollman [16]. In this tutorial, the same experiment will be set up in OpenFOAM frameworkaiming to produce the corresponding CFD simulation. The simulation produces animation whichcould be directly compared with experimental video; it is also can be extracted for plotting againstexperimental data for the rise height of the bulk meniscus as shown in Figure 4.Figure 3: “(C) Dynamic rise heights of the menisci in (a)2.9, (b)3.8, (c)7.1, and (d)10.8mm IDcircular tubes are shown after 2s of flow where 0.65cS PDMS rises a maximum length of 143mmin(b) 3.8mm ID tube. The arrow highlights the optimal tube used to achieve maximum flow lengthwithin the freefall time. (D) Dynamic rise heights of the menisci in (a)2.9, (b)3.8, (c)7.1,and(d)10.8mm ID circular tubes are shown after 2s of flow where 5cS PDMS rises a maximum length of67mmin (d) 10.8mm ID tube. The arrow highlights the optimal tube used to achieve maximumflowlength within the freefall time.” [16]3 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc NguyenFigure 4: “Sample of reduced data from tests performed in Fig. 2.1b, where the capillary risein circular tubes height l (t) is plotted against t and t 1/2 for 0.65cS (solid symbols) and 5cSPDMS (open symbols). Predicting the flow that travels the farthest in the 2.1s drop time availableis an optimization problem between capillary, inertial, and viscous forces as functions of tubedimensions.” [16]4The Overall WorkflowThe tutorial presents step-by-step instruction to solve the “Capillary Race” problem based on theOpenFOAM framework. The following list outlines the steps from initial setup to the simulationresult:1. Building OpenFOAM Framework on a Personal Computer2. Prepare Geometry, Mesh with SALOME3. Introduction to OpenFOAM directory structure4. Prepare an OpenFOAM case directory and importing the mesh5. Setting Transport Properties, Initial and Boundary Conditons. Setting Solver Parametersand Stopping Criteria for Transient Solution6. Running the solver and Extracting Data with PyFoam and swak4Foam7. Visualization with ParaView, Video encoding the results with avconv, Plotting the resultswith matplotlib5Building OpenFOAM Framework on a Personal Computer5.1Building a Ubuntu on VMware The first step of buidling OpenFOAM Framework is to install an operating system on whichit runs. In this tutorial, the choosen method is to build Ubuntu, a free operating system on avirtual machine, VMware Player, also a free and popular virtual machine software. VMwarePlayer software is installed on a host computer installed with Windows 7 (64-bit).4 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen Go to https://my.vmware.com/web/vmware/free and create a free account to download afree version of VMware Player compatible with Windows 7 (64-bit) Installation of VMware Player is similiar to other Windows 7 software. After installation, thestart screen of VMware Player looks like below: An image of Ubuntu 13.04 (64-bit) code-name Raring Ringtail is recommended as the operating system for OpenFOAM framework to run on. Go to http://www.ubuntu.com/download/desktop to download a copy. The file should be ubuntu-13.04-desktop-amd64.iso Click on Create a new Virtual Machine and choose the file downloaded on the above step asthe installer disc image file The next steps include naming the virtual machine, setting a personal account, specifyingthe disk capacity for your virtual machine. It is recommended to have at least 20GB for thedisk size and stored as a single file to enhance the performance of the virtual machine or asSplit for moderate amount of capacity. During installation, other hardware configuration isalso required. Below is an example of configuration for a virtual machine. Click Finish tostart the installation of Ubuntu. Internet connection is mandatory since the VMware Player needs to download the VMWareTools for Linux. The installation of Ubuntu comes shortly after.5 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen The installation takes around 30 to 40 minutes. Once it is finished, Ubuntu is ready to belogged in by the personal account set up above.5.2Essential Linux for this tutorialOpenFOAM Framework runs on Ubuntu, a Linux-based operating system. It is highly recommended for OpenFOAM users to have basic knowledge such as file system, control command,terminal, application installation in Ubuntu. Some OpenFOAM training course includes good tutorial on the essential Linux for OpenFOAM [14]. Several essential tasks for this tutorial are listedas below: Open a terminal which is the main communication tool to connect with OpenFOAM Framework. The combination key is Ctrl Alt T. Using sudo apt-get install to get the necessary packages Manipulating the terminal. An important command is to terminate it by using the combination Ctrl C. Basic commands for files and directories in Ubuntu which are frequently used such as copy,move, delete. File listing, check current path, change permission, change owner of files and/ordirectories, use source to run a simple script are also important Use text editor such as gedit or vim to edit and save a script6 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen Understand the path and environment variables of files and directories in Ubuntu. For example, / is the home folder which also is a good place to include working directories forapplications of OpenFOAM Framework; / is the root folder; ./ is the root current folder5.3SALOME Installation SALOME is a set of applications producing geometries and meshes as inputs for OpenFOAM. SALOME also includes many necessary libraries and tools for OpenFOAM Framework such as Python, Numpy, VTK, etc. Inside the virtual machine, go to http://www.salome-platform.org/downloads/, register for a free user and download SALOME binaries version 7.3.0 for Ubuntu 13.04 (64 bits). The downloaded file is a zipped file nameInstallWizard 7.3.0 Ubuntu13.04 64bit.tar.gz/ Right click on the file and choose Open with Archive Manager to open the file. In the ArchiveManager window, click Extract and choose the destination folder. The result is the installerfolder. The README file inside the folder includes the installation instruction for SALOME. Open a Terminal and go to the installer folder. Type in the command ./runInstall -g likethe following screen-shot. The graphic SALOME v7.3.0 Installation Wizard opens. The installation is composed of 8steps. Choose Install binaries as Installation Type. Choose the Installation directory folder.The Installation directory folder is /salome 7.3.0. Choose all the products for the choiceof the products to be installed then the installation progress will begin. Some steps are shownin the following screen-shots.7 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen During the installation, absence of some libraries might cause issues. Using the sudo apt-getinstall in terminal to get the required libraries. After the installation finishes, path and environment variables should be added to Ubuntu.This task is very common when installing softwares in Ubuntu. To do this, one is to go tokernel folder of SALOME which is just installed and run the script salome.sh by commandsource salome.sh every time opening a new terminal; another better one is to add to it theend /.bashrc script. Once the path and environment variables are acknowledged by Ubuntu, SALOME could bestarted anywhere. To start SALOME, open a new Terminal and type runSalome. Salomeshould start and open the main working window.8 of 51

ME4485.4“Capillary Race” in Circular Tubes using OpenFOAMDuc NguyenInstall OpenFOAM core package Before the installation of OpenFOAM core package, it is recommended to add OpenFOAMto the application source list and update Ubuntu with the latest package. The step is shownas the following screen-shot. In this tutorial, openfoam222 will be installed by sudo apt-get install method. Installation of OpenFOAM requires many libraries to be updated.9 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen The OpenFOAM package installation is completed with the reminder to add the bashrc scriptof OpenFOAM the main bashrc script. This is done similiar to the way to configure terminalfor Salome. Testing the installation successful of OpenFOAM could be done by testing if Ubuntu terminal could realize the OpenFOAM command like icoFOAM --help or OpenFOAM path andenviroment variables as shown the following screen-shot. The case in this tutorial and many others inherit from the OpenFOAM tutorial cases. Copythe tutorial from FOAM TUTORIALS directory to FOAM RUN which is the main working directory to run OpenFOAM cases later. To view the full path of these directories, echo commandcould be used.10 of 51

ME4485.5“Capillary Race” in Circular Tubes using OpenFOAMDuc NguyenInstall PyFoam, swak4FoamPyFoam is a set Python programs designed to manipulate and enhance the run of OpenFOAMsolver. In this tutorial, PyFoam will be used to run the solver job and monitor the initial residualsand continutiy. To install PyFoam, follow these steps: Download the PyFoam tar package at d unzip the tar package using Archive Manager or built-in tar application of Ubuntu. Thedestination is suggested to be home folder. Go inside the PyFoam folder and run the setup python script. Since the requisite librariesfor PyFoam such as python, numpy, scipy are already included in the SALOME directory,the setup of PyFoam will refer to those libraries. To test the installation of PyFoam, use the simple python program below. PyFOAM shouldbe linked to OpenFOAM.11 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyenswak4Foam which stands for Swiss Army Knife for OpenFOAM is a set of useful tool for extractingdata from OpenFOAM result and/or setting the boundary and initial conditions. swak4Foam couldbe installed using instruction from openfoamwiki.net/index.php/Contrib/swak4Foam. This tutorial introduces another method which is successfully installed with OpenFOAM 2.2.2. swak4Foam requires 2 packages which are Bison, a parser generator and Flex, a lexicalanalyser. Installation of the two package are done by sudo apt-get install Go to https://github.com/wyldckat/swak4foam and download a zip sourcode of swak4foam0.2.4 Go to this CFD-online thread and download the patch so swak4foam 0.2.4 html Unzip the swak4Foam package to get the installer folder whose name is swak4foam-OF22x andmove the patch inside this folder. The folder structure of swak4Foam looks like he followingscreen-shot. Unzip and run the patch inside the installer folder as in the following screen-shot.12 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen Compile the source. It takes up to 1 hour. Once the installation is completed, it could be tested by enter a command of swak4Foam suchas funkySetFields. The result should display the swak4Foam version as in the followingscreen-shot.5.6Install Paraview, matplotlib, gnuplot, avconv, ffmpegParaView, the visualization program for displaying result of OpenFOAM is installed by sudoapt-get install method. The version paraviewopenfoam3120 matches natively with OpenFOAM 2.2.2 without any configuration. ParaView could process the outputs of OpenFOAMcomputation as still images. These images could be combined to make a video to simulate the13 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc Nguyen“Capillary Race”. This is done by video encoder such as avconv or ffmpeg. Installation of theseis also done by the use of sudo apt-get install method.matplotlib is a set of Python plotting libraries and also includes pylab which is a proceduralstate machine resembling MATLAB. Users can easily use syntaxes as simple as ones in MATLABto extract then plotting data for example in this tutorial the height of the capillary rise. Installationof matplotlib is described as following steps. Download a zip .gz package from http://matplotlib.org/downloads.html. In this tutorials, the version downloaded is matplotlib 1.2.0 from the following location: http://sourceforge.net/projects/matplotlib/files/ Unzip the downloaded package to a destination folder. Go to the folder and run the pythonsetup script with the prefix referring to SALOME directory where Python is installed. Thecommand is python setup.py install --prefix /salome 7.3.0/Python-2.7.3/In this tutorial, gnuplot will be used for plotting the residuals of the numerical computation.Installation could be also done by by sudo apt-get install method.66.1Prepare and Import Geometry and Mesh with SalomeCreate Geometry for four capillary tubesThe section describes the steps using SALOME to prepare geometry and mesh for the four tubeswith 2.9, 3.8, 7.1 and 10.8 mm of ID with length of 160 mm.Start up SALOME by running start command runSalome in a bash terminal. Click on the Geometrybutton or choose from the environment drop-down list to activate Geometry module. A window inthe following screen-shot appears, click on New to create a new Geometry.The dimension is configured default to mm regarding the tubes in this problems are in mm. To dothis, Click File Properties and change Length units to mm as shown in the following screen-shot.14 of 51

ME448“Capillary Race” in Circular Tubes using OpenFOAMDuc NguyenFirstly, the following steps will create the four tubes using cylinder tool in Geometry module.Again, the inner diameters of the four tubes are 2.9, 3.8, 7.1 and 10.8 mm and the location of thesetubes are at the origin, 8, 20 and 36 mm respectively in y-axis of YZ-plane. Select New Entity Primitive Cylinder. The default option allows the construction with the center of the base at the origin. Enterthe radius of 1.45 and the height of 160 for the first cylinder then click on Apply and Closeas the following screen-shot. The cylinder is shown on the OCC viewer screen. Next steps are to create the points at which the next three tubes are placed. Select NewEntity Basic Point. Enter the coordinate (0,8,0) for x,y,z coordinates for the position ofsecond tube as the following

by ESI group, a French-based CAE software company. OpenFOAM is a set of solvers and utilities primarily for CFD with capabilities of standard tasks of CFD working ow from pre-processing, solving and post-processing. OpenFOAM solves wide-rage of problem from in

Related Documents:

TOPIC 1.5: CIRCULAR MOTION S4P-1-19 Explain qualitatively why an object moving at constant speed in a circle is accelerating toward the centre of the circle. S4P-1-20 Discuss the centrifugal effects with respect to Newton’s laws. S4P-1-21 Draw free-body diagrams of an object moving in uniform circular motion.File Size: 1MBPage Count: 12Explore furtherChapter 01 : Circular Motion 01 Circular Motionwww.targetpublications.orgChapter 10. Uniform Circular Motionwww.stcharlesprep.orgMathematics of Circular Motion - Physics Classroomwww.physicsclassroom.comPhysics 1100: Uniform Circular Motion & Gravitywww.kpu.caSchool of Physics - Lecture 6 Circular Motionwww.physics.usyd.edu.auRecommended to you based on what's popular Feedback

Chapter 7. FLUID-ROCK INTERACTION 60 7.1 Surface tension 60 7.2 Interfacial tension 62 7.3 Wettability 62 7.4 Capillary pressure 63 7.5 Capillary pressure in porous rock 67 7.6 Measurement of capillary pressure 71 7.7 Applications of capillary pressure 73 7.8 Correlating capillary pressure data 76 Chapter 8.

Figure 19.17 HP hydrostatic pressure Due to fluid pressing against a wall "Pushes" In capillary (HP c) Pushes fluid out of capillary 35 mm Hg at arterial end and 17 mm Hg at venous end of capillary in this example In interstitial fluid (HP if)Capillary Net HP Pushes fluid into capillary 0 mm Hg in this example(35 OP osmotic pressure

your partner for tubes, pipes and accessories for the oil- and gas industry, chemical and petroche-mical industry, energy and offshore technology, paper, pharma, textile industry and automotive. With this catalogue we like to introduce you our possibilities for: Boiler Tubes / Furnace Tubes / Heat Exchanger Tubes: seamless and welded

Robert Shapiro B ENEVOLENT M AGIC & L IVING P RAYER R OBERT S HAPIRO LIGHT TECHNOLOGY . Explorer Race series The Explorer Race ETs and the Explorer Race Explorer Race: Origins and the Next 50 Years Explorer Race: Creators and Friends Explorer Race: Particle Personalities The Explorer Race and Beyond Explorer Race: The Council of Creators

Use of CoaguChek XS Plus & XS Pro for Capillary INRs Appendix 12 – Use of CoaguChek XS Plus & XS Pro for Capillary INRs Pathology: Point of Care T esting Use of CoaguChek XS Plus & XS Pro for Capillary INRs POCT LP 003 161 EDITION No 5 DATE OF ISSUE 19 June 2014 REVIEW INTERVAL 3 Years AUTH

The Stunt Race Creator expands the possibilities of the GTA Online Race Creator by adding hundreds of Stunt Props and new features, enabling the amazing Creator . 5. STUNT TUBES Use Stunt Tubes to enclose players and give them a 360 range of motion 05. Tubes .

Your Home Tube Feeding: PEG Tubes, Gastrostomy Tubes (G‐Tubes) and Jejunostomy Tubes (J‐Tubes) (TJUH) Introduction Good nutrition is an important part of your treatment, recovery, and well‐being. When you are not able to eat enough, it