Tutorial: Using a UDF to Control the Dynamic Mesh of a Flexible Oscillating Membrane



Similar documents
Set up and solve a transient problem using the pressure-based solver and VOF model.

Steady Flow: Laminar and Turbulent in an S-Bend

Tetrahedral Mesh Generation

GAMBIT Demo Tutorial

Applying a circular load. Immediate and consolidation settlement. Deformed contours. Query points and query lines. Graph query.

Editing Common Polygon Boundary in ArcGIS Desktop 9.x

Trace Layer Import for Printed Circuit Boards Under Icepak

Multiphase Flow - Appendices

ANSYS FLUENT. Using Moving Reference Frames and Sliding Meshes WS5-1. Customer Training Material

Laminar Flow in a Baffled Stirred Mixer

Introduction to CFD Analysis

Tutorial: 2D Pipe Junction Using Hexa Meshing

Introduction to ANSYS ICEM CFD

Tutorial 1. Introduction to Using ANSYS FLUENT in ANSYS Workbench: Fluid Flow and Heat Transfer in a Mixing Elbow

Tutorial: 3D Pipe Junction Using Hexa Meshing

Finite Element Modeling

Knowledgebase Article

Fluid Flow Simulation Software Nᐧ FLOW. Tutorial Introduction. Dam Break Simulation

CLEO NED Active Directory Integration. Version 1.2.0

Creating a File Geodatabase

Composite Surfaces Tutorial

Fireworks 3 Animation and Rollovers

ANSYS Meshing User's Guide

Introduction to ANSYS

HowTo Rhino & ICEM. 1) New file setup: choose Millimeter (automatically converts to Meters if imported to ICEM)

RoomWizard Synchronization Software Manual Installation Instructions

Power Monitoring Expert 7.2

Word 2010: Mail Merge to with Attachments

ME Week 11 Introduction to Dynamic Simulation

A. BACK UP YOUR CURRENT DATA. QuickBooks Business Accounting Software for Windows Account Conversion Instructions

3. On the top menu bar, click on File > New > Project as shown in Fig. 2 below: Figure 2 Window for Orcad Capture CIS

Generative Drafting. Page DASSAULT SYSTEMES. IBM Product Lifecycle Management Solutions / Dassault Systemes

QuickBooks Business Accounting Software for Windows

Embankment Consolidation

Organizing and Managing

Advanced Layer Popup Manual DMXzone Advanced Layer Popup Manual

Avaya Modular Messaging Microsoft Outlook Client Release 5.2

Creating a Poster in Powerpoint

Getting Started with ANSYS ANSYS Workbench Environment

How to Join QNAP NAS to Microsoft Active Directory (AD)

CosmosWorks Centrifugal Loads

Dreamweaver. Links and Tables

Lecture 16 - Free Surface Flows. Applied Computational Fluid Dynamics

Introductory FLUENT Training

Monitoring Oracle Enterprise Performance Management System Release Deployments from Oracle Enterprise Manager 12c

CFD software overview comparison, limitations and user interfaces

Castle Modeling. In this PDF tutorial we will be modeling a simple castle as pictured above.

Advanced Outlook Tutorials

version 3.0 tutorial - Turbulent mixing in a T-junction with CFDSTUDY in SALOME contact: saturne-support@edf.fr

Modeling Fire Hazard By Monica Pratt, ArcUser Editor

GUIDE TO POST-PROCESSING OF THE POINT CLOUD

ME6130 An introduction to CFD 1-1

Microsoft Office 2010

Finding Drag Coefficient using Solidworks Flow Simulation

Accounts Receivable WalkThrough

Introduction to Autodesk Inventor for F1 in Schools

ABAQUS/CAE Tutorial: Analysis of an Aluminum Bracket

FaxCore Ev5 -To-Fax Setup Guide

In this tutorial I will be uploading multiple images to my ftp folder on my ktools site, and then add them using manager.

Business Portal for Microsoft Dynamics GP Field Service Suite

Database Servers Tutorial

A Guide to the free mesh program Discretizer with OpenFOAM for CFD (Computational Fluid Dynamics)

Lecture 7 - Meshing. Applied Computational Fluid Dynamics

User Guide. Opening secure from the State of Oregon Viewing birth certificate edits reports in MS Excel

Customer Training Material. Shell Meshing Stamped Part ICEM CFD. ANSYS, Inc. Proprietary 2010 ANSYS, Inc. All rights reserved. WS3.

Software for Producing Rack Layouts and Purchase Orders

Lecture 6 - Boundary Conditions. Applied Computational Fluid Dynamics

Tutorial - PEST. Visual MODFLOW Flex. Integrated Conceptual & Numerical Groundwater Modeling

Table of Contents. I. Banner Design Studio Overview II. Banner Creation Methods III. User Interface... 8

Introduction to Autodesk Inventor for F1 in Schools

Tutorial: Biped Character in 3D Studio Max 7, Easy Animation

How To Print On A Computer On A Macbook With A Powerpoint 3D (For Free) On A Pc Or Macbook 2 (For Cheap) On Pc Or Pc Or Ipad (Forfree) On An Ipad 3D Or

Scientific Graphing in Excel 2010

Course in ANSYS. Import + meshing issues. ANSYS Part 2 Computational Mechanics, AAU, Esbjerg

Security Assertion Markup Language (SAML) Site Manager Setup

Understand the Sketcher workbench of CATIA V5.

Backing up with Windows 7

NAS 206 Using NAS with Windows Active Directory

Create a folder on your network drive called DEM. This is where data for the first part of this lesson will be stored.

Project Setup and Data Management Tutorial

Outlook Profile Setup Guide Exchange 2010 Quick Start and Detailed Instructions

Microsoft SharePoint Products & Technologies

Where do I find? Global Outlook options and features

Create Charts in Excel

Chapter 23: Drafting in Worksheet View

MAPPING THE WEBDRIVE REFERENCE GUIDE

MICROSOFT STEP BY STEP INTERACTIVE VERSION 3.0 ADMINISTRATION GUIDE

Embroidery Fonts Plus ( EFP ) Tutorial Guide Version

Team Foundation Server 2012 Installation Guide

This tutorial provides detailed instructions to help you download and configure Internet Explorer 6.0 for use with Web Commerce application.

Introduction to CFD Analysis

This tutorial provides a recipe for simulating L

SCUt ils SmartAssign Guide Solution for Microsoft System Center 2012 Service Manager

Advanced Presentation Features and Animation

INSTRUCTIONS FOR MAKING 3D,.DWG CONTOUR LINES

PUTTING THE SPIN IN CFD

Tutorial for Assignment #2 Gantry Crane Analysis By ANSYS (Mechanical APDL) V.13.0

Importing and Opening an Alignment

A Tutorial on dynamic networks. By Clement Levallois, Erasmus University Rotterdam

Instructions for Configuring a SAS Metadata Server for Use with JMP Clinical

Transcription:

Tutorial: Using a UDF to Control the Dynamic Mesh of a Flexible Oscillating Membrane Introduction The purpose of this tutorial is to illustrate how to use a user defined function (UDF) to control the dynamic mesh of a generic flow device with a rotating blade and a flexible oscillating membrane. The motion of the rotating blade and the oscillating membrane have a large amplitude which requires the use of local remeshing. The rotation of the blade, the oscillation of the membrane, and the sliding of the nodes along the top wall of the housing are defined and controlled by means of a UDF that utilizes the three macros specific to the dynamic mesh model. In this tutorial you will learn how to: Set up the dynamic mesh (DM) model for this problem. Use the three DM-specific macros in a UDF to control the dynamic mesh. Preview the dynamic mesh before starting the flow computation. Prerequisites This tutorial assumes that you are familiar with the FLUENT interface and have a good understanding of the basic set up and solution procedures. Some of the basic steps in the setup and solution procedures will not be shown explicitly. You should be familiar with the dynamic mesh model. Refer to Section 11.3: Dynamic Meshes in the FLUENT 6.3 User s Guide. Problem Description A generic flow device with a flexible oscillating membrane beneath it is shown in Figure 1. The valve radius is 0.1 m. c Fluent Inc. December 11, 2006 1

Figure 1: Problem Schematic Preparation 1. Copy the mesh file butterfly-flex.msh and the source file butterfly-flex.c to your working folder. 2. Start the 2D (2d) version of FLUENT. Setup and Solution Step 1: Grid 1. Read the mesh file butterfly-flex.msh. File Read Case... 2. Check the grid. Grid Check FLUENT will perform various checks on the mesh and will report the progress in the console. Make sure that the minimum reported volume is a positive number. 2 c Fluent Inc. December 11, 2006

3. Display the grid (Figure 2). Display Grid... (a) Click the Colors... button to open the Grid Display panel. i. Enable Color by ID in the Options list. ii. Close the Grid Colors panel. (b) Click Display and close the Grid Display panel. c Fluent Inc. December 11, 2006 3

Grid FLUENT 6.3 (2d, pbns, lam) Figure 2: Grid Display Colored by ID Step 2: Models 1. Select the unsteady solver. Define Models Solver... 4 c Fluent Inc. December 11, 2006

(a) Retain the selection of Pressure Based in the Solver list. (b) Select Unsteady in the Time group-box. (c) Retain the default settings for other parameters. (d) Click OK to close the Solver panel. Step 3: Compile the UDF Define User-Defined Functions Compiled... 1. Click the Add... button in the Source Files section to open the Select File dialog box. (a) Select the file butterfly-flex.c and click OK to close the Select File dialog box. 2. Enter libudf-flex as the Library Name. 3. Click Build. A Warning dialog box will appear, asking you to make sure that the UDF source files are in the directory that contains the case and data files. (a) Click OK button to close the Warning dialog box. 4. Click Load. c Fluent Inc. December 11, 2006 5

The contents of the UDF are listed in the appendix for your reference. The first section (under DEFINE CG MOTION) prescribes a constant angular rotation about the z-axis, and is used to spin the valve. The second section (under DEFINE GEOM) defines a line at y = R = 0.109 m; this line is coincident with the top wall of the housing and guides the nodes as they slide along the top wall. The third section (under DEFINE GRID MOTION) controls the motion of the nodes belonging to the membrane. The initial shape of the membrane is that of a circular arc, and then it moves up and down harmonically. Step 4: Dynamic Mesh Setup The mesh is controlled using a combination of local remeshing with sizing functions and spring smoothing. 1. Set up the controls for spring smoothing. Define Dynamic Mesh Parameters... (a) Enable Dynamic Mesh in the Models group-box. For check boxes, Dynamic Mesh Parameters panel will expand to show relevant inputs. (b) Enable Remeshing in the Mesh Methods group-box. 6 c Fluent Inc. December 11, 2006

(c) Set the following parameters in the Smoothing tab. i. Enter 0.3 for the Spring Constant Factor. Setting the value of the Spring Constant Factor causes the tri mesh adjacent to the boundary layer to remain almost unchanged. This avoids skewed cells near the object. ii. Enter 1 for the Boundary Node Relaxation. iii. Enter 0.001 for the Convergence Tolerance. iv. Enter 20 for the Number of Iterations. c Fluent Inc. December 11, 2006 7

(d) Click the Remeshing tab and specify the parameters as follows: Make sure that Size Function in the Options group-box is deselected. Parameter Value Minimum Length Scale (m) 0.00236 Maximum Length Scale (m) 0.02 Maximum Cell Skewness 0.65 Size Remesh Interval 1 The Minimum Length Scale (m) and Maximum Length Scale (m) can be obtained from the Mesh Scale Info panel. Click Mesh Scale Info... to open the Mesh Scale Info panel. (e) Click OK to close the Dynamic Mesh Parameters panel. 2. Specify the wall-butterfly zone as a rigid body. Define Dynamic Mesh Zones... 8 c Fluent Inc. December 11, 2006

(a) Select wall-butterfly from the Zone Names drop-down list. (b) Select Rigid Body in the Type list. (c) Select butterfly flex UDF::libudf-flex from the Mesh Motion UDF drop-down list. (d) Retain the default value for Center of Gravity Location as (0,0). The valve motion is defined about its center of gravity (CG) located at (0,0). This is important in the case of rotation. (e) Click the Meshing Options tab and enter 0.002 m for Cell Height. c Fluent Inc. December 11, 2006 9

(f) Click Create. 3. Specify the wall-top zone as a deforming zone. The objective is to allow all nodes located on the top wall to slide along that wall as the tip of the valve moves past it. Thus define a horizontal line and set wall-top zone as a deforming zone. 10 c Fluent Inc. December 11, 2006

(a) Select wall-top from the Zone Names drop-down list. (b) Select Deforming in the Type list. (c) Click the Geometry Definition tab. i. Select user-defined from the Definition drop-down list. ii. Select plane::libudf-flex from the Geometry UDF drop-down list. (d) Click the Meshing Options tab. c Fluent Inc. December 11, 2006 11

i. Deselect Remeshing in the Methods list. ii. Retain the default values for other parameters. iii. Click the Create button. 4. Specify the membrane zone as a dynamic zone. 12 c Fluent Inc. December 11, 2006

The motion of the membrane and its shadow wall is governed by the function moving arc from the UDF. (a) Select membrane from the Zone Names drop-down list. (b) Select User-Defined in the Type list. (c) Select moving arc::libudf-flex from the Mesh Motion UDF drop-down list. (d) Click Create. 5. Similarly, define the membrane-shadow zone as a dynamic zone. 6. Save the case file (membrane-moving-init.cas.gz). File Write Case... c Fluent Inc. December 11, 2006 13

Step 5: Mesh Motion Preview 1. Specify the parameters for the mesh motion. Solve Mesh Motion... (a) Enter 0.005 s for Time Step Size. (b) Enter 313 for Number of Time Steps (c) Click the Preview button. The valve will move through 90 degrees and assume the position shown in Figure 3. Grid (Time=1.5650e+00) FLUENT 6.3 (2d, pbns, dynamesh, lam, unsteady) Figure 3: Grid Display After Mesh Motion 14 c Fluent Inc. December 11, 2006

Summary In this tutorial you modeled an oscillating membrane in a generic flow device with a rotating blade using the dynamic mesh model in FLUENT. The local remeshing scheme was used to define the mesh motion. Dynamic mesh specific macros of a UDF were used to govern the rotational motion of the blade, deformation of the membrane and the sliding of the nodes on the top wall of the housing. Appendix The contents of the UDF are as follows: #include "udf.h" #define omega 1.0 /* rotational speed, rad/sec */ #define R 0.109 /* radius of the arc, meters */ DEFINE_CG_MOTION(butterfly_flex_UDF, dt, cg_vel, cg_omega, time, dtime) { cg_vel[0] = 0.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; } cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; DEFINE_GEOM(plane, domain, dt, position) { position[1] = R; } DEFINE_GRID_MOTION(moving_arc, domain, dt, time, dtime) { Thread *tf = DT_THREAD (dt); face_t f; Node *node_p; real alpha, theta, x, ymag, yfull, y; int n; c Fluent Inc. December 11, 2006 15

/* Set/activate the deforming flag on adjacent cell zone, which */ /* means that the cells adjacent to the deforming wall will also be */ /* deformed, in order to avoid skewness. */ SET_DEFORMING_THREAD_FLAG (THREAD_T0 (tf)); alpha = omega * CURRENT_TIME; theta = 2.0 * alpha + 3.0 * M_PI / 2.0; begin_f_loop (f, tf) { f_node_loop (f, tf, n) { node_p = F_NODE (f, tf, n); /* Update the current node only if it has not been */ /* previously visited: */ if (NODE_POS_NEED_UPDATE (node_p)) { /* Set flag to indicate that the current node s */ /* position has been updated, so that it will not be */ /* updated during a future pass through the loop: */ NODE_POS_UPDATED (node_p); x = NODE_X (node_p); ymag = sqrt (R*R - x*x) + 0.03; yfull = ymag - 0.1; y = - 0.1 + yfull * sin(theta); NODE_Y (node_p) = y; } } } end_f_loop (f, tf); } 16 c Fluent Inc. December 11, 2006