This document provides an overview of using user-defined functions (UDFs) in Fluent to solve practical problems. It discusses several case studies where UDFs were used, including regulating temperature at an inlet based on exit temperature, modeling a membrane that allows selective mass transfer of species, and simulating staggered particle injection in a silo launch simulation with a moving mesh. The document outlines the basic concepts of how UDFs access solver data structures and solution process, and provides examples of common UDF macros like DEFINE_PROFILE, DEFINE_ADJUST, and DEFINE_SOURCE that were used in the case studies.
1) The document discusses heat transfer modeling in FLUENT including the energy equation, wall boundary conditions, conjugate heat transfer, thin walls, natural convection, and radiation models.
2) It provides details on the various terms in the energy equation including viscous dissipation, species diffusion, chemical reactions, and interphase transfer.
3) Examples are presented on conjugate heat transfer of an electronic chip on a circuit board using both a meshed wall and thin wall approach.
The document discusses various modeling approaches for simulating flows in moving domains, including rotating reference frames, mesh deformation, and multiple frame of reference models. Rotating reference frames allow steady-state solutions by solving equations in a rotating frame. Mesh deformation involves moving mesh nodes to accommodate moving boundaries. Multiple frame models are needed when domains rotate at different rates, using approaches like frozen rotor, stage, or transient rotor-stator models.
This document discusses two-phase flow models and compares different pressure drop correlation methods. It begins with an introduction to two-phase flow and important variables like liquid holdup, gas void fraction, and slip velocity. It then describes the different flow patterns or regimes that can occur, including dispersed bubble, stratified smooth, wavy, slug, annular, and spray flows. The document outlines factors that affect flow patterns and discusses how patterns vary between horizontal, upward inclined, and downward inclined pipes. It concludes that selecting the most suitable correlation is key to accurately sizing pipelines for different applications.
This document provides an overview of turbulence modeling for computational fluid dynamics (CFD) simulations. It discusses the characteristics of turbulent flow, the governing equations, and common approaches to modeling turbulence such as Reynolds-averaged Navier-Stokes (RANS) and large eddy simulation (LES). For RANS modeling, it covers time-averaging techniques and the closure problem. It also discusses modeling near wall turbulence effects using wall functions or resolving the boundary layer, and highlights two common turbulence models: the k-ε model and k-ω model.
Lectures on Heat Transfer - Introduction - Applications - Fundamentals - Gove...tmuliya
This file contains Introduction to Heat Transfer and Fundamental laws governing heat transfer.
The slides were prepared while teaching Heat Transfer course to the M.Tech. students in Mechanical Engineering Dept. of St. Joseph Engineering College, Vamanjoor, Mangalore, India.
The document provides an introduction to pump analysis. It discusses that the purpose of a pump is to increase the mechanical energy in a fluid by transporting it from a lower elevation to a higher elevation. It then covers key pumping concepts like capacity, head, efficiency, and power input. Specific types of pumps are defined, including centrifugal pumps which are most commonly used for wastewater applications. Methods for analyzing pump performance including head-capacity curves and affinity laws are also introduced.
This document provides an introduction to heat transfer and thermodynamics concepts. It discusses how heat transfer is related to thermodynamics and distinguishes between different forms of energy. The three main modes of heat transfer are conduction, convection and radiation. Heat is defined as the transfer of energy between two systems due to a temperature difference, and will flow from the higher temperature object to the lower temperature one. The document provides objectives and outlines concepts like thermal energy, mechanisms of heat transfer, Fourier's law of conduction and applications of heat transfer.
1) The document discusses heat transfer modeling in FLUENT including the energy equation, wall boundary conditions, conjugate heat transfer, thin walls, natural convection, and radiation models.
2) It provides details on the various terms in the energy equation including viscous dissipation, species diffusion, chemical reactions, and interphase transfer.
3) Examples are presented on conjugate heat transfer of an electronic chip on a circuit board using both a meshed wall and thin wall approach.
The document discusses various modeling approaches for simulating flows in moving domains, including rotating reference frames, mesh deformation, and multiple frame of reference models. Rotating reference frames allow steady-state solutions by solving equations in a rotating frame. Mesh deformation involves moving mesh nodes to accommodate moving boundaries. Multiple frame models are needed when domains rotate at different rates, using approaches like frozen rotor, stage, or transient rotor-stator models.
This document discusses two-phase flow models and compares different pressure drop correlation methods. It begins with an introduction to two-phase flow and important variables like liquid holdup, gas void fraction, and slip velocity. It then describes the different flow patterns or regimes that can occur, including dispersed bubble, stratified smooth, wavy, slug, annular, and spray flows. The document outlines factors that affect flow patterns and discusses how patterns vary between horizontal, upward inclined, and downward inclined pipes. It concludes that selecting the most suitable correlation is key to accurately sizing pipelines for different applications.
This document provides an overview of turbulence modeling for computational fluid dynamics (CFD) simulations. It discusses the characteristics of turbulent flow, the governing equations, and common approaches to modeling turbulence such as Reynolds-averaged Navier-Stokes (RANS) and large eddy simulation (LES). For RANS modeling, it covers time-averaging techniques and the closure problem. It also discusses modeling near wall turbulence effects using wall functions or resolving the boundary layer, and highlights two common turbulence models: the k-ε model and k-ω model.
Lectures on Heat Transfer - Introduction - Applications - Fundamentals - Gove...tmuliya
This file contains Introduction to Heat Transfer and Fundamental laws governing heat transfer.
The slides were prepared while teaching Heat Transfer course to the M.Tech. students in Mechanical Engineering Dept. of St. Joseph Engineering College, Vamanjoor, Mangalore, India.
The document provides an introduction to pump analysis. It discusses that the purpose of a pump is to increase the mechanical energy in a fluid by transporting it from a lower elevation to a higher elevation. It then covers key pumping concepts like capacity, head, efficiency, and power input. Specific types of pumps are defined, including centrifugal pumps which are most commonly used for wastewater applications. Methods for analyzing pump performance including head-capacity curves and affinity laws are also introduced.
This document provides an introduction to heat transfer and thermodynamics concepts. It discusses how heat transfer is related to thermodynamics and distinguishes between different forms of energy. The three main modes of heat transfer are conduction, convection and radiation. Heat is defined as the transfer of energy between two systems due to a temperature difference, and will flow from the higher temperature object to the lower temperature one. The document provides objectives and outlines concepts like thermal energy, mechanisms of heat transfer, Fourier's law of conduction and applications of heat transfer.
This document discusses two-phase flow patterns and flow pattern maps. It describes different flow patterns that can occur in horizontal and vertical tubes, including stratified, wavy, plug, dispersed bubble, slug and annular flows. Flow pattern maps are used to predict the flow patterns based on gas and liquid velocities. Empirical maps are developed based on experiments, while theoretical maps are developed using models. Examples of both empirical maps, like those by Baker and Hewitt & Roberts, and theoretical maps, like by Taitel & Dukler, are provided and compared.
CFD Modeling of Multiphase Flow. Focus on Liquid-Solid FlowLuis Ram Rojas-Sol
This document provides an outline for a workshop on multiphase flow modeling. The workshop will cover introduction to flow assurance and multiphase flows, modeling slurry flows using computational fluid dynamics (CFD) with a focus on ANSYS tools, and a case study of liquid-particle flow in a horizontal pipe using ANSYS Fluent. There are two main approaches to modeling multiphase flows discussed - semi-analytical mechanistic models and numerical models using either an Eulerian-Lagrangian or Eulerian-Eulerian framework.
Turbulent flows are characterized by chaotic, unpredictable changes in velocity. The document discusses turbulence, including defining turbulence, the transition from laminar to turbulent flow, Reynolds averaging to decompose variables into mean and fluctuating components, and the effects of turbulence on the Navier-Stokes equations. It also examines Reynolds stresses, time-averaged conservation equations for turbulent flow, and modeling approaches like Reynolds averaging to account for turbulent fluctuations and closure problems in the equations.
This document discusses heat transfer through conduction and various methods for solving the heat equation using finite difference approximations. It introduces the heat equation in Cartesian, cylindrical and spherical coordinates. It discusses boundary conditions and describes setting up a nodal network to discretize the domain. It then presents the finite difference form of the heat equation and describes different cases for nodal finite difference equations, including for interior nodes, nodes at corners or surfaces with convection, and nodes at surfaces with uniform heat flux. It discusses solving the finite difference equations using matrix inversion, Gauss-Seidel iteration, and provides examples.
This document provides an overview of an online course on applied fluid mechanics for incompressible flow. The course is divided into two parts, with part 1 focusing on incompressible flow (constant density fluids) and part 2 on compressible flow (variable density fluids). Part 1 covers topics like the mechanic energy equation, piping systems, pumps, flow measurement devices, and their applications to problems involving incompressible fluids. The course content is presented through online modules containing theory, examples, practice problems and quizzes. The goal is to teach students and engineers how to apply fluid mechanics concepts to real-world engineering problems involving the movement and processing of incompressible liquids and gases.
Throttling refers to the process where a fluid flows through a partially open valve, causing a significant pressure drop but constant enthalpy. During throttling, velocity may change slightly due to compressibility but enthalpy remains constant. Throttling is commonly used to control steam turbine speed, determine steam dryness, and in refrigeration plants and gas liquefaction. The Joule-Thomson experiment demonstrated that during throttling, enthalpy remains constant through a porous plug, validating the throttling process model.
This document discusses key concepts in fluid dynamics, including:
1. Fluid flow, viscosity, and Bernoulli's equation are the main properties of fluid dynamics. Fluid flow is the movement of a fluid and can be steady or turbulent. Viscosity is the resistance of fluid layers sliding past one another.
2. Bernoulli's equation relates pressure, velocity, and elevation in fluid systems. It states that the total mechanical energy (pressure + potential + kinetic energy) remains constant in fluid flow. Higher velocities correspond to lower pressures.
3. Other topics covered include streamlines, continuity equation, rate of flow, factors affecting viscosity, and examples applying Bernoulli's equation. The goal is to analyze pressure and velocity in various
The derivation of the equation of motion for various fluids is similar to the d derivation of Eular’s equation. However ,the tangential stresses arise during the motion of a real viscous fluid, must be considered
This document provides an overview of finite difference methods for solving partial differential equations. It introduces partial differential equations and various discretization methods including finite difference methods. It covers the basics of finite difference methods including Taylor series expansions, finite difference quotients, truncation error, explicit and implicit methods like the Crank-Nicolson method. It also discusses consistency, stability, and convergence of finite difference schemes. Finally, it applies these concepts to fluid flow equations and discusses conservative and transportive properties of finite difference formulations.
The document summarizes three turbulence models: the standard k-ε model, RNG k-ε model, and realizable k-ε model. The major differences between the models are their methods of calculating turbulent viscosity, turbulent Prandtl numbers, and generation/destruction terms. Some features are similar between the models, including turbulent production, buoyancy effects, and modeling heat/mass transfer. The realizable k-ε model addresses deficiencies of previous models like predicting round jet spreading rates. Buoyancy effects are included in all three models through modifications to the turbulent kinetic energy generation term.
This document discusses using computational fluid dynamics (CFD) to analyze the flow through a gear pump. It provides background on CFD methodology and applications. It then describes the specific problem of simulating flow through an external gear pump using ANSYS Fluent. It details the geometry, mesh, boundary conditions, solver settings and dynamic mesh setup used. The goal is to determine the mass flow rate of oil through the pump.
This document provides information about two-dimensional steady state heat conduction using the finite difference method. It includes:
1) Derivation of the finite difference equations for interior nodes, nodes on insulated surfaces, and nodes with convection boundary conditions using the energy balance method.
2) Discussion of using shape factors and dimensionless parameters to solve conduction problems and examples of common geometric configurations.
3) Methods for verifying the accuracy of finite difference solutions, including grid refinement studies and comparison to exact solutions.
The document discusses different types of multiphase flows. It defines multiphase flow as any fluid system with two or more distinct phases flowing simultaneously in mixture. Multiphase flows are classified into four main categories: gas-liquid flows, gas-solid flows, liquid-solid flows, and three-phase flows. Each category contains different flow regimes depending on factors like particle size and flow rates. Flow maps are used to characterize different flow patterns that can occur for a given system.
This document summarizes key concepts in basic steam engineering related to nucleate boiling in boilers. It describes the process of nucleate boiling and how variations in circulation can lead to temporary changes in water level known as shrink and swell. Key terms are defined, such as subcooled nucleate boiling, quality, annulus formation, thermal driving head, head losses, and boiler end points including the end point of circulation. Causes and limits of natural circulation in boilers are also covered.
This document discusses heat transfer and thermodynamics. It begins by introducing concepts like temperature, heat, and work. It then covers the three laws of thermodynamics. The main modes of heat transfer are conduction, convection, and radiation. The document also derives the general heat conduction equation in Cartesian coordinates for a material with constant thermal conductivity. It shows how this equation can be simplified for different boundary conditions and whether heat generation is present or not.
Obtain average velocity from a knowledge of velocity profile, and average temperature from a knowledge of temperature profile in internal flow.
Have a visual understanding of different flow regions in internal flow, and calculate hydrodynamic and thermal entry lengths.
Analyze heating and cooling of a fluid flowing in a tube under constant surface temperature and constant surface heat flux conditions, and work with the logarithmic mean temperature difference.
Obtain analytic relations for the velocity profile, pressure drop, friction factor, and Nusselt number in fully developed laminar flow.
Determine the friction factor and Nusselt number in fully developed turbulent flow using empirical relations, and calculate the heat transfer rate.
Parallel flow heat exchanger is analysed with CFD tool. A comparative study of the analytical and experimental data is carried out to better understand the temperature profile, surface heat flux and heat transfer co-efficient parameters of the heat exchanger
Seven students presented a detailed approach on thermodynamics. They restated the first law of thermodynamics and defined enthalpy. Common enthalpy changes were discussed, including enthalpy of vaporization. The characteristics and physical model of enthalpy of vaporization were described. An experiment was conducted to determine the enthalpy of vaporization of water at different pressures using a Clausius-Clapeyron analysis of temperature and pressure readings. The results were within 5% of accepted values. Applications of enthalpy of vaporization include steam power generation and distillation.
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0ARPIT SINGHAL
This document provides a tutorial for setting up a case for the OpenFOAM solver chtMultiRegionFoam. It describes dividing the computational domain into multiple regions with different material properties, defining the regions by selecting cells, splitting the mesh according to the defined regions, and the necessary files and folders for a chtMultiRegionFoam case. Key steps include declaring the regions and their properties, defining cell sets and zones to divide the domain, running utilities to split the mesh and modify files for each region.
Researched improvements on increasing efficiency of organic solar cells by utilizing and modifying the Purdue University researchers NanoMOS MATLAB simulations
https://nanohub.org/resources/1305?rev=1
This document discusses two-phase flow patterns and flow pattern maps. It describes different flow patterns that can occur in horizontal and vertical tubes, including stratified, wavy, plug, dispersed bubble, slug and annular flows. Flow pattern maps are used to predict the flow patterns based on gas and liquid velocities. Empirical maps are developed based on experiments, while theoretical maps are developed using models. Examples of both empirical maps, like those by Baker and Hewitt & Roberts, and theoretical maps, like by Taitel & Dukler, are provided and compared.
CFD Modeling of Multiphase Flow. Focus on Liquid-Solid FlowLuis Ram Rojas-Sol
This document provides an outline for a workshop on multiphase flow modeling. The workshop will cover introduction to flow assurance and multiphase flows, modeling slurry flows using computational fluid dynamics (CFD) with a focus on ANSYS tools, and a case study of liquid-particle flow in a horizontal pipe using ANSYS Fluent. There are two main approaches to modeling multiphase flows discussed - semi-analytical mechanistic models and numerical models using either an Eulerian-Lagrangian or Eulerian-Eulerian framework.
Turbulent flows are characterized by chaotic, unpredictable changes in velocity. The document discusses turbulence, including defining turbulence, the transition from laminar to turbulent flow, Reynolds averaging to decompose variables into mean and fluctuating components, and the effects of turbulence on the Navier-Stokes equations. It also examines Reynolds stresses, time-averaged conservation equations for turbulent flow, and modeling approaches like Reynolds averaging to account for turbulent fluctuations and closure problems in the equations.
This document discusses heat transfer through conduction and various methods for solving the heat equation using finite difference approximations. It introduces the heat equation in Cartesian, cylindrical and spherical coordinates. It discusses boundary conditions and describes setting up a nodal network to discretize the domain. It then presents the finite difference form of the heat equation and describes different cases for nodal finite difference equations, including for interior nodes, nodes at corners or surfaces with convection, and nodes at surfaces with uniform heat flux. It discusses solving the finite difference equations using matrix inversion, Gauss-Seidel iteration, and provides examples.
This document provides an overview of an online course on applied fluid mechanics for incompressible flow. The course is divided into two parts, with part 1 focusing on incompressible flow (constant density fluids) and part 2 on compressible flow (variable density fluids). Part 1 covers topics like the mechanic energy equation, piping systems, pumps, flow measurement devices, and their applications to problems involving incompressible fluids. The course content is presented through online modules containing theory, examples, practice problems and quizzes. The goal is to teach students and engineers how to apply fluid mechanics concepts to real-world engineering problems involving the movement and processing of incompressible liquids and gases.
Throttling refers to the process where a fluid flows through a partially open valve, causing a significant pressure drop but constant enthalpy. During throttling, velocity may change slightly due to compressibility but enthalpy remains constant. Throttling is commonly used to control steam turbine speed, determine steam dryness, and in refrigeration plants and gas liquefaction. The Joule-Thomson experiment demonstrated that during throttling, enthalpy remains constant through a porous plug, validating the throttling process model.
This document discusses key concepts in fluid dynamics, including:
1. Fluid flow, viscosity, and Bernoulli's equation are the main properties of fluid dynamics. Fluid flow is the movement of a fluid and can be steady or turbulent. Viscosity is the resistance of fluid layers sliding past one another.
2. Bernoulli's equation relates pressure, velocity, and elevation in fluid systems. It states that the total mechanical energy (pressure + potential + kinetic energy) remains constant in fluid flow. Higher velocities correspond to lower pressures.
3. Other topics covered include streamlines, continuity equation, rate of flow, factors affecting viscosity, and examples applying Bernoulli's equation. The goal is to analyze pressure and velocity in various
The derivation of the equation of motion for various fluids is similar to the d derivation of Eular’s equation. However ,the tangential stresses arise during the motion of a real viscous fluid, must be considered
This document provides an overview of finite difference methods for solving partial differential equations. It introduces partial differential equations and various discretization methods including finite difference methods. It covers the basics of finite difference methods including Taylor series expansions, finite difference quotients, truncation error, explicit and implicit methods like the Crank-Nicolson method. It also discusses consistency, stability, and convergence of finite difference schemes. Finally, it applies these concepts to fluid flow equations and discusses conservative and transportive properties of finite difference formulations.
The document summarizes three turbulence models: the standard k-ε model, RNG k-ε model, and realizable k-ε model. The major differences between the models are their methods of calculating turbulent viscosity, turbulent Prandtl numbers, and generation/destruction terms. Some features are similar between the models, including turbulent production, buoyancy effects, and modeling heat/mass transfer. The realizable k-ε model addresses deficiencies of previous models like predicting round jet spreading rates. Buoyancy effects are included in all three models through modifications to the turbulent kinetic energy generation term.
This document discusses using computational fluid dynamics (CFD) to analyze the flow through a gear pump. It provides background on CFD methodology and applications. It then describes the specific problem of simulating flow through an external gear pump using ANSYS Fluent. It details the geometry, mesh, boundary conditions, solver settings and dynamic mesh setup used. The goal is to determine the mass flow rate of oil through the pump.
This document provides information about two-dimensional steady state heat conduction using the finite difference method. It includes:
1) Derivation of the finite difference equations for interior nodes, nodes on insulated surfaces, and nodes with convection boundary conditions using the energy balance method.
2) Discussion of using shape factors and dimensionless parameters to solve conduction problems and examples of common geometric configurations.
3) Methods for verifying the accuracy of finite difference solutions, including grid refinement studies and comparison to exact solutions.
The document discusses different types of multiphase flows. It defines multiphase flow as any fluid system with two or more distinct phases flowing simultaneously in mixture. Multiphase flows are classified into four main categories: gas-liquid flows, gas-solid flows, liquid-solid flows, and three-phase flows. Each category contains different flow regimes depending on factors like particle size and flow rates. Flow maps are used to characterize different flow patterns that can occur for a given system.
This document summarizes key concepts in basic steam engineering related to nucleate boiling in boilers. It describes the process of nucleate boiling and how variations in circulation can lead to temporary changes in water level known as shrink and swell. Key terms are defined, such as subcooled nucleate boiling, quality, annulus formation, thermal driving head, head losses, and boiler end points including the end point of circulation. Causes and limits of natural circulation in boilers are also covered.
This document discusses heat transfer and thermodynamics. It begins by introducing concepts like temperature, heat, and work. It then covers the three laws of thermodynamics. The main modes of heat transfer are conduction, convection, and radiation. The document also derives the general heat conduction equation in Cartesian coordinates for a material with constant thermal conductivity. It shows how this equation can be simplified for different boundary conditions and whether heat generation is present or not.
Obtain average velocity from a knowledge of velocity profile, and average temperature from a knowledge of temperature profile in internal flow.
Have a visual understanding of different flow regions in internal flow, and calculate hydrodynamic and thermal entry lengths.
Analyze heating and cooling of a fluid flowing in a tube under constant surface temperature and constant surface heat flux conditions, and work with the logarithmic mean temperature difference.
Obtain analytic relations for the velocity profile, pressure drop, friction factor, and Nusselt number in fully developed laminar flow.
Determine the friction factor and Nusselt number in fully developed turbulent flow using empirical relations, and calculate the heat transfer rate.
Parallel flow heat exchanger is analysed with CFD tool. A comparative study of the analytical and experimental data is carried out to better understand the temperature profile, surface heat flux and heat transfer co-efficient parameters of the heat exchanger
Seven students presented a detailed approach on thermodynamics. They restated the first law of thermodynamics and defined enthalpy. Common enthalpy changes were discussed, including enthalpy of vaporization. The characteristics and physical model of enthalpy of vaporization were described. An experiment was conducted to determine the enthalpy of vaporization of water at different pressures using a Clausius-Clapeyron analysis of temperature and pressure readings. The results were within 5% of accepted values. Applications of enthalpy of vaporization include steam power generation and distillation.
Tutorial to set up a case for chtMultiRegionFoam in OpenFOAM 2.0.0ARPIT SINGHAL
This document provides a tutorial for setting up a case for the OpenFOAM solver chtMultiRegionFoam. It describes dividing the computational domain into multiple regions with different material properties, defining the regions by selecting cells, splitting the mesh according to the defined regions, and the necessary files and folders for a chtMultiRegionFoam case. Key steps include declaring the regions and their properties, defining cell sets and zones to divide the domain, running utilities to split the mesh and modify files for each region.
Researched improvements on increasing efficiency of organic solar cells by utilizing and modifying the Purdue University researchers NanoMOS MATLAB simulations
https://nanohub.org/resources/1305?rev=1
1) Axiomatic design is a methodology that uses design axioms to guide the design process. The two main axioms are the Independence Axiom and the Information Axiom.
2) The Independence Axiom states that the design should maintain independence between functional requirements and design parameters. This means that changing one design parameter does not affect other functional requirements.
3) Examples of coupled, decoupled, and uncoupled designs are presented to illustrate the Independence Axiom. A refrigerator door and water faucet are used as examples.
This document describes an Open Modeling System (OMS) component for solving Richards' equation in one dimension to model water flow and transport in soil. The component uses a nested Newton algorithm to solve the nonlinear system of equations. Input data includes soil hydraulic properties, initial conditions, and boundary conditions. Output includes water pressure and water content profiles over time. Instructions are provided on running the component within the OMS console.
CFD Analysis Of Multi-Phase Flow And Its MeasurementsIOSR Journals
Multiphase flow occurs when more than one material is present in a flow field and the materials are
present in different physical states of matter or are present in the same physical state of matter but with distinct
chemical properties. The materials present in multiphase flow are often identified as belonging to the primary
or secondary phases. The primary phase is characterized as the phase that is continuous about, or enveloping
of, the secondary phase. The secondary phase is thought to be the material that is distributed throughout the
primary phase. Each phase present in multiphase flow may be either laminar or turbulent, which leads to a
variety of potential flow regimes for multiple phases in the same channel. Project is based on two-phase flow
and its measurement (water + air/vapor). This is frequently encountered in thermal and nuclear power plants,
R&A/C and cryogenic applications, chemical industries and biotechnology etc., the arrangement of a vertical
tube with two water inlets and three air inlets. By varying air and water flow rates following things are
demonstrated and calculated:
Flow regime identification through visualization
Pressure drop measurement
The analysis carried out by the flow of air + water mixture using by Computational Fluid Dynamics (CFD)
technique
Development of Multi-level Reduced Order MOdeling MethodologyMohammad
This document summarizes the development of a new multi-level reduced order modeling (MLROM) methodology. MLROM allows extracting the effective dimensionality of a high-fidelity nuclear reactor model by executing the model in a small sub-domain, like a pin cell, rather than the entire domain. This significantly reduces computational cost compared to previous ROM methods. The document describes the mathematical framework of MLROM and presents initial numerical tests of the method using a benchmark boiling water reactor lattice model. Results suggest MLROM can accurately represent the full model while requiring far fewer executions of the high-fidelity code.
This document summarizes the development of a multi-level reduced order modeling (MLROM) methodology. MLROM uses a physics-informed approach to extract an active subspace by executing a high-fidelity model on sub-domains, like a pin cell, rather than the full domain like the whole core. This reduces computational cost. Error bounds for the reduced model are established using the pin-cell determined active subspace and verified against full-order lattice simulations. Future work will apply MLROM to core-wide calculations using representative lattices to capture the core-wide active subspace.
This document summarizes a computational analysis of flow behavior over a multi-stage launch vehicle with strap-on boosters. A structured grid and commercial CFD software Fluent were used to model the 2D flow field. Finer meshes were generated near vehicle surfaces to capture shocks accurately. Both Euler and Navier-Stokes solvers were tested using various turbulence models. Results aimed to understand complex flow interactions over the multi-component vehicle configuration.
The document provides an overview of the history and basics of finite element analysis (FEA). It discusses how FEA was first developed in 1943 and expanded in the following decades. The basics section describes common FEA applications, basic steps which include converting differential equations to algebraic equations, element types, boundary conditions including loads and constraints, and pre-processing, solving, and post-processing steps. Key element types are also summarized.
The document discusses COMSOL's CFD module. It begins by introducing the CFD module and its capabilities for fluid dynamics simulation. It then describes the different interfaces for single-phase flow simulation in COMSOL, including laminar flow, turbulent flow, and creeping flow interfaces. The document concludes by outlining the general 8-step procedure for setting up and running CFD simulations in COMSOL.
vlsi qb.docx imprtant questions for all unitsnitcse
This document contains a question bank for the course EC3352: VLSI & Chip Design. It includes questions related to MOS transistor operation, CMOS logic, layout design rules, I-V characteristics, delay modeling, scaling concepts, and CMOS fabrication processes. Key topics covered are threshold voltage, body effect, latch-up, twin tub process, SOI process, Elmore delay model, logical effort, critical paths, and layout design rules such as lambda-based rules. Sample questions assess understanding of MOSFET parameters, transfer characteristics, non-ideal effects, noise margins, rise/fall times, and stick diagrams. Layout aspects include designing a 2-input NAND gate and explaining P-well and n
This document provides an overview and outline of a training course for using the PRESTO 3.2 signal integrity simulation software. It introduces important concepts in PRESTO such as design components, nets, crossections, signal parameters, transmission line types, reflections, crosstalk, simultaneous switching noise, and electrical and physical models. The outline lists topics that will be covered in the training including CAD data extraction, the PRESTO input file format, library setup, simulation, results analysis, and modeling techniques like crosstalk, noise, and electromagnetic interference simulations.
This document describes an experimental and computational study of flow over a blunt cylinder-flare model in high supersonic flow. Wind tunnel experiments were conducted in the TST-27 and ST-15 wind tunnels at Mach numbers from 3 to 4 and angles of attack up to 20 degrees. Measurements included surface pressure distributions, flow visualization using shadowgraph and Schlieren techniques, and digital holographic interferometry to obtain density distributions in the flowfield. Computational simulations of the inviscid flow were also performed using a three-dimensional Euler solver. The goal was to provide high-quality aerodynamic data to validate computational fluid dynamics codes for simulating high-speed flows with phenomena such as shocks, separation
Ultra Violet-Visable Spectroscopy Analysis of Spin Coated SubstratesNicholas Lauer
This document describes a UV-Vis analysis of spin coated substrates to determine thin film thickness. The method uses UV-Vis spectroscopy to measure the reflectance of samples at different wavelengths. By analyzing the wavelengths corresponding to maximum and minimum reflectance, the film thickness can be calculated using equations that relate thickness to the wavelength differences and refractive index. Sample data from 5 concentrations of polystyrene films were imported and their thickness calculated and plotted against concentration.
This document describes a Kriging component for spatial interpolation of climatological variables in the OMS modeling framework. Kriging is a geostatistical technique that interpolates values based on measured data and the spatial autocorrelation between data points. The component implements ordinary and detrended Kriging algorithms using 10 semivariogram models. It can interpolate both raster and point data and outputs the interpolated climatological variable values. Links are provided for downloading the component code, data, and OMS project files needed to run the interpolation.
This document provides an overview of computational fluid dynamics (CFD) modeling and simulation using commercial CFD software. It discusses the key steps in the CFD process including defining the geometry, governing equations, boundary conditions, meshing, solving the equations numerically, and post-processing the results. Examples of applications in aerospace, automotive, and other industries are given. The document also summarizes some of the main features and capabilities of the Fluent CFD software.
Numerical simulations have been undertaken
for the benchmark problem in a Square cavity by using
computational fluid dynamics software. This work aims at
discussing the fundamental numerical and computational
fluid dynamic aspects which can lead to the definition of
the following meshing methods and turbulence models.
The meshes used for the simulation are hexahedral,
hexahedral cell with near wall refinement, tetrahedral
grid, polyhedral, tetrahedral with near wall refinement
and polyhedral mesh with prism layer cells based the near
wall thickness of Y+ less than one. The turbulence models
used for the simulation work are AKN K-Epsilon Low-Re,
Realizable K-Epsilon, Realizable K-Epsilon Two-Layer,
standard K-Epsilon, standard K-Epsilon Low-Re,
Standard K-Epsilon Two-Layer, V2F K-Epsilon,
SST(Menter) K-Omega, and Standard(Wilcox) K-Omega.
From these meshes and turbulence models, we will
conclude the suitable mesh and turbulence for the
recirculation flow by the grid independent test. These
analytical values of results are compared with reference
data which gives an optimization of experimental work.
Unsteady simulation was ran for all the Grid Independent
mesh with the SST k omega model with the time step of
0.01 sec for 40 seconds. The flow nature is studied with
and without the temperature for Reynolds number, 1000
and 10000.
TELEMAC is hydrodynamic modeling software that can:
1. Solve the shallow water equations using finite element or finite volume methods on an unstructured triangular grid.
2. Perform simulations of free surface flows, accounting for effects like turbulence, temperature/salinity gradients, and dry areas.
3. Include pre- and post-processing tools for generating grids, visualizing results, and exchanging data with GIS software.
This document provides an introduction to the basic concepts of computational fluid dynamics (CFD). It discusses the need for CFD due to the inability to analytically solve the governing equations for most engineering problems. The document then summarizes some common applications of CFD in industry, including simulating vehicle aerodynamics, mixing manifolds, and bio-medical flows. It also outlines the overall strategy of CFD in discretizing the continuous problem domain into a discrete grid before discussing specific discretization methods like the finite difference and finite volume methods.
This document summarizes a study of variability model coevolution patterns in the Linux kernel. The researchers analyzed over 4,000 changes to identify 13 patterns of how the variability model, mappings, and implementation coevolved together. The most common patterns were adding and removing optional modular and non-modular features. A key finding was that merges, where a feature is removed from the model but still supported, require analyzing all coevolving artifacts. The patterns provide concrete operations for tool builders to mirror real-world coevolution.
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...kalichargn70th171
In today's business landscape, digital integration is ubiquitous, demanding swift innovation as a necessity rather than a luxury. In a fiercely competitive market with heightened customer expectations, the timely launch of flawless digital products is crucial for both acquisition and retention—any delay risks ceding market share to competitors.
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
What to do when you have a perfect model for your software but you are constrained by an imperfect business model?
This talk explores the challenges of bringing modelling rigour to the business and strategy levels, and talking to your non-technical counterparts in the process.
How Can Hiring A Mobile App Development Company Help Your Business Grow?ToXSL Technologies
ToXSL Technologies is an award-winning Mobile App Development Company in Dubai that helps businesses reshape their digital possibilities with custom app services. As a top app development company in Dubai, we offer highly engaging iOS & Android app solutions. https://rb.gy/necdnt
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
Unveiling the Advantages of Agile Software Development.pdfbrainerhub1
Learn about Agile Software Development's advantages. Simplify your workflow to spur quicker innovation. Jump right in! We have also discussed the advantages.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
Malibou Pitch Deck For Its €3M Seed Roundsjcobrien
French start-up Malibou raised a €3 million Seed Round to develop its payroll and human resources
management platform for VSEs and SMEs. The financing round was led by investors Breega, Y Combinator, and FCVC.
2. 2
Objective
The objective of this course is to show examples of
UDF implementation to solve practical problems
This is not a course on “how to program UDF”, but
rather on “how to apply UDF to real world problem”
It is assumed that auditory has at least preliminary
knowledge of UDF, however we will cover basics of
UDF in several slides
All cases were developed by Fluent staff
Some cases are preceded by short synopsis of
UDF macros that are used
3. 3
Outline
Basic concepts of how UDF is built and used
Regulated temperature at inlet (1)
Modeling of membrane (2)
Staggered injection of particles in silo launch simulation (3)
Basic concepts on variable access in multiphase models
Drag coefficient for spherical cap bubble (4)
Modeling of evaporation from liquid droplets (5)
Basic concepts of parallel UDF
Writing of pressure distribution into file for parallel runs (6)
Moving mesh and variable time step for store separation
example (7)
Appendix
User Defined Memory
Filter blockage modeling for Discrete Particle Model (8)
Customized erosion model for Discrete Particle Model (9)
4. 4
User Access to Fluent Solver
Fluent is so designed that the user can access the solver at some strategic
instances during the solution process
Flow
Diagram
of
FLUENT
Solvers
Segregated Solver Coupled Solver
Initialize Begin
Loop
Exit Loop Repeat
Check
Convergence
Update Properties Solve Eddy
Dissipation
Solve Turbulence
Kinetic Energy
Solve Species
Solve Energy
Solve Mass Continuity;
Update Velocity
Solve U-Momentum
Solve V-Momentum
Solve W-Momentum
Solve Mass
Momentum &
Energy
Flow
Diagram
of
FLUENT
Solvers
Segregated Solver Coupled Solver
Initialize Begin
Loop
Exit Loop Repeat
Check
Convergence
Update Properties Solve Eddy
Dissipation
Solve Turbulence
Kinetic Energy
Solve Species
Solve Energy
Solve Mass Continuity;
Update Velocity
Solve U-Momentum
Solve V-Momentum
Solve W-Momentum
Solve Mass
Momentum &
Energy
User-
defined
ADJUST
Source terms
Source terms
Source terms
Source termsSource terms
Source termsSource terms
Source termsSource terms
Boxes in
blueblue are
some
important
user
access
points
User
Defined
Initialize
Boxes in
blueblue are
some
important
user
access
points
User
Defined
Initialize
User-Defined PropertiesUser-Defined Properties
User-Defined Boundary Conditions
5. 5
User Defined Functions in Fluent
UDF’s in FLUENT are available for:
Profiles (Boundary Conditions)
velocity, temperature,
pressure etc
Source terms (Fluid and solid zones)
mass, momentum, energy,
species etc
Properties
viscosity, conductivity etc (except
specific heat)
Initialization
zone and variable specific initialization
Global Functions
adjust
Scalar Functions
unsteady term, flux vector, diffusivity
Model Specific Functions
reaction rates, discrete phase model,
turbulent viscosity
User Defined Functions are not just any C-functions:
User access needs specific “Type” of function calls
These Function types or ‘macro’-s are defined in the header file:
~Fluent.Inc/fluentx.y/src/udf.h
6. 6
Data Structures in FLUENT
Domain
CellCell
Thread
Domain
CellCell
Thread
face
cellcell
face
cellcell
Boundary (face thread or zone) Fluid (cell thread or zone)
Domain
Cell
7. 7
The Domain
“Domain” is the set of connectivity and hierarchy
info for the entire data structure in a given problem.
It includes:
all fluid zones (‘fluid threads’)
all solid zones (‘solid threads’)
all boundary zones (‘boundary threads’)
Cell/face - Computational unit, face is one side.
Conservation equations are solved over a cell
Thread - is the collection of cells or faces; defines a
fluid/solid/boundary zone
8. 8
Domain and Threads
Wall
Porous
Medium
Fluid-1
Solid-1
Solid-2
Outlet
Wall
Fluid-2
Inlet
DomainDomain
ofof
AnalysisAnalysis
CorrespondingCorresponding
Data setData set
Inlet
Fluid-2
Fluid-1
Solid-1
Outlet
Porous
Medium
Solid-2Wall
DomainDomain
ThreadsThreads
Wall
Porous
Medium
Fluid-1
Solid-1
Solid-2
Outlet
Wall
Fluid-2
Inlet
DomainDomain
ofof
AnalysisAnalysis
Wall
Porous
Medium
Fluid-1
Solid-1
Solid-2
Outlet
Wall
Fluid-2
Inlet
DomainDomain
ofof
AnalysisAnalysis
CorrespondingCorresponding
Data setData set
Inlet
Fluid-2
Fluid-1
Solid-1
Outlet
Porous
Medium
Solid-2Wall
DomainDomain
ThreadsThreads
Inlet
Fluid-2
Fluid-1
Solid-1
Outlet
Porous
Medium
Solid-2Wall
Inlet
Fluid-2
Fluid-1
Solid-1
Outlet
Porous
Medium
Solid-2Wall
DomainDomain
ThreadsThreads
9. 9
Cell and Face Datatypes
Control volumes (equivalent of ‘FEM:Elements’) of fluid and solid zones
are called ‘cell’ in FLUENT
The data structure for the control volumes is typed as ‘cell_t’
The data structure for the control volume faces is typed as ‘face_t’
A fluid or solid zone is comprised of cells
The Thread that identifies the cells in a Fluid or Solid Thread, is a
‘Cell-Thread’
A boundary zone is comprised of faces of the adjacent control volumes
or cells
The Thread that identifies the faces on a boundary is a
‘Face-Thread’
10. 10
Cell & Face Threads; Cell_t & Face_t Datatypes
TypeType ExampleExample DetailsDetails
Domain *d pointer to the collection of all threads
Thread *t pointer to a thread
Cell_t c cell identifier
face_t f face identifier
Node *node pointer to a node
Boundary face-thread
the boundary-face ensembleFluid cell-thread
the Control-volume
ensemble Internal face-thread
the Internal-face ensemble
associated to cell-threads
Nodes
11. 11
#include "udf.h"
DEFINE_PROFILE(w_profile, thread, position)
{
face_t f;
real b_val;
begin_f_loop(f, thread)
{
b_val = …/* your boundary value*/
F_PROFILE(f, thread, position) = b_val;
}
end_f_loop(f, thread)
}
thread : The thread of the boundary to
which the profile is attached
position : A solver internal variable
(identifies the stack location of
the profile in the data stack)
User can rename the variables at will:
DEFINE_PROFILE(my_prof, t, pos)
Boundary Profiles: DEFINE_PROFILE
You can use this UDF to
specify
Wall
temperature
heat flux, shear stress
Inlets
velocity
temperature
turbulence
species
scalars
The macro begin_f_loop
loops over all faces on the
selected boundary thread
The F_PROFILE macro
applies the value to face, f on
the thread
User
specified
name
Arguments
from the
solver to
this UDF
It’s a
must!
12. 12
Inlet temperature is a function of mass averaged exit
temperature
ID of exit boundary is taken from BC panel and is used
to find exit face thread:
exit_face_thread = Lookup_Thread(domain, exit_id);
Thread of cells next to exit face is identified:
cell_thread = THREAD_T0(exit_face_thread);
( )outin TfT =
∫ ∫=
exit exit
out dVTdVT ρρ /
Inlet Temperature vs exit Temperature (1)
13. 13
The following UDFs will be used :
DEFINE_PROFILE
Identifies outlet thread from BC panel and
identifies cells next to thread to perform mass
averaging
Calculates mass averaged temperature at outlet
and stores it
Uses calculated mass averaged temperature
and uses it as argument to calculate profile of
inlet temperature
Inlet Temperature vs exit Temperature (1)
14. 14
Inlet Temperature vs exit Temperature (1)
DEFINE_PROFILE(inlet_temperature, thread,
nv)
{
/* Loop through the faces of the exit surface*/
begin_f_loop(f1, exit_face_thread)
{
/* macro F_C0 is utilized to find neighbor cell*/
cell0 = F_C0(f1, exit_face_thread);
cell_temp = C_T(cell0, cell_thread);
cell_vol = C_VOLUME(cell0, cell_thread);
cell_density = C_R(cell0, cell_thread);
cell_mass = cell_vol*cell_density;
total_mass += cell_mass;
total_mass_temp += cell_mass*cell_temp;
}
end_f_loop(f1, exit_face_thread);
/* calculation of mass averaged T */
exit_temp = total_mass_temp/total_mass;
}
/* Enter the T_inlet vs T_exit here */
inlet_temp = exit_temp + 30.;
begin_f_loop(f2, thread)
{
F_PROFILE(f2, thread, nv) = inlet_temp;
}
end_f_loop(f2, thread)
}
cell0 = F_C0(f1, f_thread);
15. 15
Inlet Temperature vs exit Temperature (1)
Application to flow in elbow with two inlets
inT
30TT outin +=
outT
16. 16
Molecular membrane – openings are so small that molecules can be
separated by size
Separation of gas species is possible
Very large pressure difference across membrane “squeezes” molecules
through
Convective fluxe across membrane is effectively zero
Mass flux across membrane for species i is
Permeance contains info on how “easily” molecules of species i can
“squeeze” through membrane openings
Membrane modeling (2)
( )low
i
high
iii PPQ −=φ
Membrane
permeance of
species i
High partial
pressure of
species i
Low partial
pressure of
species i
iQ
17. 17
Membrane is modeled as the inner wall which means that it cannot predict pressure
drop (it is known). Macros F_C0 and F_SHADOW are used to find cell and thread
pointers looking at both sides of membrane, i.e., high and low pressure sides
Having access to variables at cells sharing membrane cell face allows to calculate mass
flux of each species and prescribe volume sources of mass for species i at cells next to
membrane
Membrane modeling (2)
Air+ less gasMixture inlet, air+gas, high pressure
Air+more gasMembrane surface (wall)
high
P
low
P
(f,memb_t)
cell_t c0= F_C0(f,memb_t)
memb_t _shadow=
THREAD_SHADOW(memb_t)
pressure
18. 18
Membrane modeling (2)
The following UDFs will be used:
DEFINE_ADJUST
Identifies internal surface as a model of membrane
Accesses cells on both sides of surface and
calculates mass flux of each species and stores
equivalent mass sources in User Defined Memory
DEFINE_SOURCE
Uses mass sources calculated in DEFINE_ADJUST to
prescribe mass sources for every species and mixture
19. 19
Membrane modeling (2)
DEFINE_ADJUST(filter_adjust, domain)
{
………………………….
/* find membrane thread by ID in BC panel*/
memb_thread = Lookup_Thread(domain,memb_id);
/* looping over cells faces of membrane*/
begin_f_loop (f, memb_thread)
{
/* get cell pointer for side of membrane on high pressure*/
c0 = F_C0(f,memb_thread);
/* get face thread pointer for shadow membrane surface*/
memb_thread_shadow = THREAD_SHADOW(memb_thread);
/* get face pointer for shadow membrane surface*/
f_shadow = F_SHADOW(f,memb_thread);
/* get cell pointer from shadow side of membrane*/
c1 = F_C0(f_shadow,memb_thread_shadow);
/* get cell thread pointer for side of membrane*/
t0 = F_C0_THREAD(f,memb_thread);
/* get cell thread pointer for shadow side of membrane*/
t1 =memb_thread_shadow->t0;
………
Membrane
shadow face
Membrane face
20. 20
Membrane modeling (2)
/* calculate molar concentration for side of membrane*/
x_GAS_outer = molefrac(C_YI(c0, t0, 0), MW_GAS, MW_AIR);
x_AIR_outer = 1.- x_N2_outer;
/* calculate molar concentration for shadow side of membrane*/
x_GAS_inner = molefrac(C_YI(c1, t1, 0), MW_GAS, MW_AIR);
x_AIR_inner = 1.- x_N2_inner;
/* calculate membrane face area*/
F_AREA(A, f, memb_thread);
At = NV_MAG(A);
/* calculate species mass fluxes across the membrane, Pi=P*Xi*/
flux_GAS = Q_GAS * ( x_GAS_outer*P_outer - x_GAS_inner*P_inner);
flux_AIR = Q_AIR * ( x_AIR_outer*P_outer - x_AIR_inner*P_inner);
tot_flux = tot_flux + MW_GAS*flux_GAS*At + MW_AIR*flux_AIR*At;
C_UDMI(c0, t0, 0) = - (MW_GAS*flux_GAS)*At/C_VOLUME(c0,t0);
C_UDMI(c1, t1, 0) = (MW_GAS*flux_GAS)*At/C_VOLUME(c1,t1);
C_UDMI(c0, t0, 1) = -(MW_AIR*flux_AIR)*At/C_VOLUME(c0,t0);
C_UDMI(c1, t1, 1) = (MW_AIR*flux_AIR)*At/C_VOLUME(c1,t1);
}
end_f_loop (f, memb_thread)
High pressure and
mole fraction
Low pressure and
mole fraction
23. 23
Unsteady Staggered Particle Injection (3)
Unsteady DPM injection will release the particle packets at the
beginning of every timestep
A process is needed to inject particles at a certain user
specified time interval so as to reduce the number of particles
that need to be tracked inside the domain
The process will inject the particles at the beginning of a
timestep and then store/accumulate the particles’ mass during
the next timesteps when injections are turned off
At the time of the next injection, the accumulated particles’
mass will be injected
There will be fewer particles but the particles’s mass will be
preserved
24. 24
Once an injection is completed, the starting time of injection can be moved
forward in time by a user specified value using a UDF and the particles mass
accumulated for the next injection
The UDF will also move the injection locations as the exhaust location is
moving
Unsteady Staggered Particle Injection (3)
25. 25
The following UDFs will be needed to apply this trick to moving mesh example
– launch of rocket from silo:
DEFINE_ADJUST
Track the current exhaust location
Accumulate the particles’ mass when injection is not performed at a
timestep
DEFINE_DPM_INJECTION_INIT
Move the injection location
Inject the accumulated mass when injection interval is reached
DEFINE_CG_MOTION
Specify the DM layering motion
DEFINE_RW_FILE
Write injection information to data file for restart
Other functions
Post processing, etc.
Unsteady Staggered Particle Injection (3)
26. 26
Unsteady Staggered Particle Injection (3)
#include "udf.h"
#include "dynamesh_tools.h"
/*User specified injection release time interval*/
#define RELEASE_STEP 5e-3
/*Current exhaust location where injection is performed*/
static real current_loc_exh = -3.9624;
#if !RP_NODE
static int tmsp = 0;
static real current_tm = -1.0;
static real sum_inj = 0.0; /*Store the accumulated particles’ mass when
injections are skipped*/
#endif
27. 27
Unsteady Staggered Particle Injection (3)
DEFINE_ADJUST (update, domain)
{
#if !RP_NODE
real tm, tmspsz;
real msl_vel, pflow;
tm = RP_Get_Real("flow-time");
tmspsz = RP_Get_Real("physical-time-step");
if ( first_iteration ) /*first iteration of a timestep*/
{
msl_vel = get_vel_msl(tm); /*Update missile velocity */
current_loc_exh += msl_vel*tmspsz; /*&exhaust location*/
pflow = get_mdot_prt(tm);
sum_inj += mdot*tmspsz; /* Get the current particle flow rate &
store for later release */
current_tm = tm;
tmsp += 1;
}
#endif
}
28. 28
DEFINE_DPM_INJECTION_INIT (init_prt_tm, I)
{
#if !RP_NODE
Particle *p;
real tm, tmspsz, flowrate, eps=0.015;
tm = RP_Get_Real("flow-time");
tmspsz = RP_Get_Real("physical-time-step");
flowrate = sum_inj/tmspsz; /*Release all the particles that are in store since the
last release*/
loop(p,I->p_init) /*beginning of release of particles*/
{
p->state.pos[0] = current_loc_exh - eps; /*Update release points due to
movement of the exhaust location by MDM*/
p->flow_rate = flowrate;
}
if ((tm+tmspsz) >= I->unsteady_start) /*now release is delayed by moving injection time*/
I->unsteady_start += RELEASE_STEP; /*Move unsteady_start forward in time
for next release*/
sum_inj = 0.0; /*Reset storage for mass of particles*/
#endif
}
Unsteady Staggered Particle Injection (3)
This UDF is called only when DPM unsteady
start time is smaller than current time
29. 29
Application to missile silo launch. Staggered injections of particles are clearly
seen. Contours of Ma number colored by particles with residence time
Non staggered
injection
Staggered
injection
Unsteady Staggered Particle Injection (3)
31. 31
In multiphase flows each phase has its set of material properties
and may have its own set of variables
For VOF model it is
For Euler model it is
For Mixture model it is
Some variables and geometry are shared among phases
In VOF it is , in Mixture it is , in Euler it is
Therefore, an architecture that stored the phases in separate
overlaid Domains was devised.
This new Multi-Domain construction can be thought of as multiple
versions of Fluent running together, but which communicate
between each other at the level of the cells.
The Multi-Domain Architecture
i
kk Y,α
i
kkkkkk YkTU ,,,,, εα
r
i
kkk YU ,,
r
α
ε,,, kTU
r
ε,, kT ε,k
32. 32
The Multi-Domain Architecture
All the domains are in a hierarchy that has the “superdomain” at the top.
The superdomain is where the “mixture” of the phases is stored and so is often
called the “mixture domain”.
Shared values such as global settings are stored in the superdomain.
Each Phase has its own Domain known as a “subdomain” or “phase
domain”.
superdomain
P1domainP0domain P2domain
Phase Domain Interaction
Phase Subdomains
33. 33
The Multi-Domain Architecture
Each Thread is also in a hierachy that matches that of the domains
The “superthreads” are where the “mixture” of the phases is stored and so
are often called the “mixture threads”.
Shared values such as the grid geometry are stored in the superthread.
Each Phase has its own set of threads known as a “subthreads” or
“phase threads”.
superthreads
P1threadsP0threads P2threads
Phase Thread Interaction
Phase Subthreads
34. 34
Some data is shared by both types of the thread.
The data is not repeated, but each thread points to the
same data.
The most common example is the thread geometry.
Many UDFs are passed a thread as a parameter. This
thread is either a phase thread or a superthread. W
We may want the superthread of a phase thread
We may want all the phase threads of a superthread.
There is a new set of macros to get this information
about the hierarchy. These are discussed next.
The Multi-Domain Architecture
35. 35
Getting Data for a Specific Phase
DEFINE_SOURCE(x_mom, cell, t, dS, eqn)
{
Thread *tm = THREAD_SUPER_THREAD(t);
/*thread tm will be a superthread, i.e., mixture*/
Thread **pt = THREAD_SUB_THREADS(mixture_thread);
/*pt is an array such that pt[0] is mixture thread, pt[1] first
secondary phase thread, pt[2] second secondary phase thread
etc.*/
real U_secondary = C_U(cell,pt[1]);
real U_primary = C_U(cell,t); /*or U_primary=C_U(cell,pt[0]); */
real P_mixture = C_P(cell,tm); etc.
Suppose that my momentum source for primary phase is equal
(arbitrary): source = constant*(U_secondary-U_primary)*P_mixture.
This means that primary phase thread will be passed as argument
and I need to get mixture and secondary threads
36. 36
Getting Data for a Specific Phase
Now let’s see how access variables when thread is not passed
as an argument
DEFINE_ADJUST(area_density, domain)
{
Thread *t;
Thread **pt;
cell_t c;
mp_thread_loop_c (t,domain,pt) /* t is a mixture thread*/
if (FLUID_THREAD_P(t ))
{
Thread *tp = pt[0]; /* tp is a primary phase thread*/
Thread *ts = pt[1]; /* ts is a secondary thread*/
begin_c_loop (c,t)
{
C_UDMI(c,t,0) = C_VOF(c,tp)*C_T(c,ts);
}
end_c_loop (c,t)
}
}
37. 37
Exchange Macros
DEFINE_EXCHANGE_PROPERTY( name, c, mixture_thread,
second_column_phase_index,first_column_phase_index)
Specifies net heat transfer rates between phases, and drag and lift
coefficient functions
Eulerian Model – net heat transfer rate, drag coefficient, lift coefficient
Mixture Model – drag coeeficient
Phase specific variables can be accessed using first/second_column_phase
index which correspond to phase order in Phase Interaction panel
second
column
phase
first
column
phase
38. 38
Exchange Macros Drag Law for spherical cap bubbles (4)
Schiller-Naumann (default) drag coefficient is valid for spherical particles
Large bubbles have a shape of spherical cap and have constant drag
coefficient
DEFINE_EXCHANGE_PROPERTY macro for drag force must return
( )
>
≤+
=
1000440
1000150124
f
6870
drag
Re.
ReRe/Re. .
6672fdrag .=
,0)(
1
=−∑=
n
i
kiik uuK
rr
ik
drag
kkik
f
K
τ
ρα=
k
2
ik
ik
18
d
µ
ρ
τ =
39. 39
The following UDFs will be needed:
DEFINE_ EXCHANGE_PROPERTY
Identify thread for each phase
Calculate drag coefficient
Exchange Macros Drag Law for spherical cap bubbles (4)
41. 41
Exchange Macros Drag Law for spherical cap bubbles (4)
Free rising air bubbles in water
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
0 1 2 3 4 5 6 7
Bubble diameter, cm
Bubblerisingvelocity,m/sec
experiment
constant drag
Schiller-Naumann drag
pinlet
poutlet
symmetry
g
r
Bubble
velocity
Comparison for single bubble rise
velocity
42. 42
Exchange Macros Drag Law for evaporating droplets (5)
Example – water droplets feely falling in dry air
accompanied by evaporation
Water – single species mixture phase
Atmosphere – mixture of two species (air+vapor)
Evaporation from droplets into air is modeled as
heterogeneous reaction
Reaction rate is given by
( )
drop
drop
gasgasOHdropsatOHc
d
TCTCkrate
α6
)()( ,2,2 −=
Molar concentration
Area density
43. 43
Exchange Macros Drag Law for evaporating droplets (5)
The following macro will be used
DEFINE_HET_RXN_RATE
Identifies phases and species
Computes reactions rate between species of
different phases in kgmole/m3/sec
44. 44
Exchange Macros Drag Law for evaporating droplets (5)
DEFINE_HET_RXN_RATE(vap_con,c,mt,f_in,f_sp,to_in,to_sp)
{
Thread **pt = THREAD_SUB_THREADS(t);
Thread *tp = pt[0];
Thread *ts = pt[1];
real T_prim = C_T(c,tp); /*gas phase temperature*/
real T_sec = C_T(c,ts); /*droplet phase temperature*/
real diam = C_PHASE_DIAMETER(c,ts); /*gas phase diameter*/
real D_evap_prim = C_DIFF_EFF(c,tp,index_evap_primary); /* laminar
diffusivity of evporating gas species*/
C_UDMI(c,t,0) = D_evap_prim ;
urelx = C_U(c,tp) - C_U(c,ts);
urel = sqrt(urelx*urelx + urely*urely + urelz*urelz); /*slip velocity*/
Re = urel * diam * C_R(c,tp) / C_MU_L(c,tp); /*droplet Re number*/
Sc = C_MU_L(c,tp) / C_R(c,tp) / D_evap_prim ; /*gas Sc number*/
Nu = 2. + 0.6 * pow(Re, 0.5)* pow(Sc, 0.333); /*Nusselt number*/
45. 45
Exchange Macros Drag Law for evaporating droplets (5)
mass_coeff = Nu * D_evap_prim / diam ;
for (i=0; i < MAX_SPE_EQNS_PRIM ; i++) /*looping over gas species*/
{
accum = accum + C_YI(c,tp,i)/mw[i][prim_index];
}
mole_frac_evap_prim = C_YI(c,tp,index_evap_primary ) /
mw[index_evap_primary][prim_index] / accum; /* mole frac. of evap
species*/
concentration_evap_primary = mole_frac_evap_prim * P_OPER
UNIVERSAL_GAS_CONSTANT / T_prim ; /* mole conc. of evap species */
concentration_sat = psat_h2o(T_sec) / UNIVERSAL_GAS_CONSTANT /
T_sec ; /* saturation conc. of evap species */
area_density = 6. * C_VOF(c,ts) / diam ;
flux_evap = mass_coeff * (concentration_sat -
concentration_evap_primary ) ;
rr* = area_density * flux_evap;
}
46. 46
Exchange Macros Drag Law for evaporating droplets (5)
g
r
droplets
dry air
Vapor mole
fraction
Saturated
air
Evaporation
rate
47. 47
Parallel Fluent
Print messages
“(%iterate 5)”
Printmessages
“(%iterate5)”
Cortex Host
Compute-Node-0
Compute-Node-1
Compute-Node-2
Compute-Node-3
“(%iterate5)”
“(%
iterate5)”
“(%iterate5)”
Printm
essages
Printm
essages
Compute nodes labeled
consecutively starting at 0
Host labeled 999999
Host connected to Cortex
Each compute node (virtually)
connected to every other compute node
“(%iterate5)”“(%iterate5)”
48. 48
Compiler Directives
“#if” is a compiler directive; Similar to “#define”
A “#endif” is used to close a “#if
#if RP_NODE /* Compute-Node */
#if RP_HOST /* Host */
#if PARALLEL /* Equivalent to #if RP_HOST||RP_NODE*/
#if !PARALLEL /* Serial, ! means logical negation */
#if RP_HOST
Message(“I’m the Host process n”);
#endif
#if RP_NODE
Message(“I’m the Node process number:%d n”, myid);
#endif
49. 49
• Although compute nodes can perform computations on data
simultaneously when FLUENT is running in parallel, when data is
written to a single, common file, the writing operations have to be
sequential
• The file has to be opened and written to by processes that have
access to the desired file system
• This means that all of the data has to be written from the host
process which always runs on a machine with access to a file
system, since it reads and writes the case and data files
• file writing in parallel is done in the following stages
• The host process opens the file
• Compute node-0 sends its data to the host
• The other compute nodes send their data to compute node-0
• Compute node-0 receives the data from the other compute nodes
and sends it to the host
• The host receives the data sent from all the compute nodes and
writes it to the file
• The host closes the file
Writing files in parallel (6)
50. 50
Writing files in parallel (6)
• Pressure is written out at the end of the simulation for FEA analysis.
The data structure is the coordinates of a face followed by the
pressure of the face
• PRF_CRECV_INT(myid - 1, &dummy, 1, myid - 1) - message
passing macro which sends sections of data as single arrays from
one process to another process. It is used to make non-zero node
wait till node-0 is writing into the file
• myid – 1 since myid > 0, than node-myid will wait for data from
node myid-1
• &dummy – just a dummy vaiable meaning nothing
• 1 – means that just one variable is being sent (dummy)
• myid-1 – just a syntax
51. 51
Writing files in parallel (6)
The following UDFs will be needed:
DEFINE_ ON_DEMAND
Identifies a node number
If node number is more than zero, waits till all nodes with lower numbers write
their data and than appends to file to write its share of data
If it is node zero – opens file and writes data first
52. 52
Writing files in parallel (6)
# include "udf.h“
# define WALLID 3 /*id of wall for which pressure data will be written*/
DEFINE_ON_DEMAND(Write_pressure)
{
real position[ND_ND]; /*vector definition to write coordinates of cell face*/
int dummy;
Domain *domain;
Thread *tf;
face_t f;
FILE * fp;
domain=Get_Domain(1);
/* Node 0 will open a NEW file while node 1, 2, ... will wait. After node 0 finishes,
Node 1 will open the SAME file while node 2, 3 ... will wait. This goes on. */
#if RP_NODE
if (! I_AM_NODE_ZERO_P) PRF_CRECV_INT(myid - 1, &dummy, 1, myid - 1);
fp = fopen("pressure.txt", (I_AM_NODE_ZERO_P ? "w" : "a"));
#else
fp = fopen("pressure.txt", "w");
#endif
tf=Lookup_Thread(domain, WALLID);
53. 53
Writing files in parallel (6)
begin_f_loop(f,tf)
{
F_CENTROID(position, f, tf);
#if RP_2D
fprintf(fp, "%10.3e %10.3e %10.3en",
position[0], position[1], F_P(f,tf));
#else
fprintf(fp, "%10.3e %10.3e %10.3e %10.3en",
position[0], position[1], position[2], F_P(f,tf));
#endif
}
end_f_loop(f,tf)
/* After the node finishes, it will close the file and send a signal saying I am
done so that the next node can start */
#if RP_NODE
fclose(fp);
if (! I_AM_NODE_LAST_P) PRF_CSEND_INT(myid + 1, &dummy, 1,
myid);
#else
fclose (fp);
#endif
}
54. 54
Moving and Deforming Mesh + Variable Time Step (7)
You can use the DEFINE_CG_MOTION macro to specify the motion of a
particular dynamic zone in FLUENT by providing FLUENT with the linear and
angular velocities at every time step. FLUENT uses these velocities to update
the node positions on the dynamic zone based on solid-body motion. Note
that UDFs that are defined using DEFINE_CG_MOTION can only be
executed as compiled UDFs.
DEFINE_CG_MOTION ( name, dt, vel, omega, time,dtime)
dt i pointer to the structure that stores the dynamic mesh attributes that
you have specified
vel – velocity vetor
omega – angular velocity vector
time - current physical time
dtime - time step
This macro overwrites vel and omega vectors which are used to update body
position
55. 55
Moving and Deforming Mesh + Variable Time Step (7)
Coupled dynamic mesh problem adjusts the motion of the moving
body/surfaces based on the current computed aerodynamic load and
applied external forces
An optimum ‘mean’ timestep size that will apply generally for the
duration of the coupled motion is difficult to obtain since the
aerodynamic load is not known a priori
Continual and manual adjustment of the timestep size is required to
avoid using an excessively conservative value that will increase
running time or too large value that will cause the dynamic remeshing
to fail
It is possible to implement a user defined variable timestep size using
UDF
The variable timestep size is computed subject to the following
constraints:
User specifies maximum allowable translational distance
User specifies maximum allowable timestep size value
56. 56
Moving and Deforming Mesh + Variable Time Step (7)
A relation is needed to solve for the timestep size and velocity of the body:
The timestep size and the corresponding velocity of the body are such
that the body will move by the maximum allowable translational distance
A cap on the timestep size is necessary to prevent an excessively large
computed timestep size which can result in divergence
The maximum allowable translational distance can be varied as function
of time, if necessary
The timestep size and body velocity are obtained by solving a quadratic
equation derived from the following two relations:
dt
VV
M
F
dtVh
nn
n
max
−
=
×=
+
+
1
1
dt
m
F
n
V
1+n
V
maxh = maximum allowable distance traveled
= force_acting_on_body/mass_of_body
= body velocity at previous timestep
= body velocity at next timestep (uknown)
= next timestep size (unknown)
57. 57
Moving and Deforming Mesh + Variable Time Step (7)
The following UDFs will be needed:
DEFINE_EXECUTE_AT_END
Compute the forces on the body
Compute the next timestep size and body velocity subject to
the maximum allowable translational distance specified by
the user
DEFINE_CG_MOTION
Specify the MDM motion
DEFINE_RW_FILE
Save intermediate variables to data file for restart
58. 58
Moving and Deforming Mesh + Variable Time Step (7)
#include "udf.h"
#include "sg_mem.h"
#include "dynamesh_tools.h“
#define PI 3.14159265
#define usrloop(n,m) for(n=0;n<m;++n)
/*----- User needs to change the section below ----------------*/
#define zoneID 28 /* zone ID for the moving boundary */
#define b_mass 1.0 /* mass of the body */
#define dtm_mx 0.005 /* maximum allowable timestep size */
/*----- Layering parameters -------------------------------------------*/
#define hc 6.1e-5 /* ideal cell height in meter */
#define nc 4.0 /* parameter for advancing layer speed */
#define hmove hc/nc /* maximum allowable translation */
/*----- Global variables --------------------------------------------------*/
real V_body[ND_ND]; /* velocity vector of body */
real b_ctr = 0.0; /* gravity center center location */
real tmsize = 0.00001; /* current computed timestep size */
59. 59
Moving and Deforming Mesh + Variable Time Step (7)
DEFINE_EXECUTE_AT_END(exec_end)
{
real tm, dtm, Velx, Vn, Fm;
real x_cg[3], f_glob[3], m_glob[3];
Domain *domain = Get_Domain(1);
Thread *tf =
Lookup_Thread(domain,zoneID);
tm = RP_Get_Real("flow-time");
/* Reset arrays to 0 */
usrloop(m,ND_ND) x_cg[m] = 0.0;
usrloop(m,ND_ND) f_glob[m] = 0.0;
usrloop(m,ND_ND) m_glob[m] = 0.0;
/* Get the previous c.g. for the
ball zone */
x_cg[0] = b_ctr;
/* Compute the forces on the body */
Compute_Force_And_Moment
(domain,tf,x_cg,f_glob,m_glob,TRUE);
/* Compute velocity and timestep
size from quadratic equation */
Vn = V_body[0];
Fm = f_glob[0]/b_mass;
dtm = ( -fabs(Vn) + sqrt( Vn*Vn +
4.0*fabs(Fm)*hmove ) )/
( 2.0*fabs(Fm) );
if ( dtm > dtm_mx ) dtm = dtm_mx;
Velx = Vn + Fm*dtm;
if ( (x_cg[0]<=(-Smax))||
(x_cg[0]>=Smax) ) Velx = 0.0;
/* Update velocities, timestep size,
and ball c.g. location */
V_body[0] = Velx;
tmsize = dtm;
b_ctr += V_body[0]*tmsize;
RP_Set_Real("physical-time-
step",tmsize);
}
60. 60
Moving and Deforming Mesh + Variable Time
Step (7) DEFINE_RW_FILE(reader,fp)
{
int m;
#if !RP_NODE
float v_read;
usrloop(m,ND_ND)
{
fscanf(fp,"%en",&v_read);
V_ball[m] = (real)v_read;
}
fscanf(fp,"%en",&v_read); b_ctr =
(real)v_read;
fscanf(fp,"%en",&v_read); tmsize =
(real)v_read;
#endif
usrloop(m,ND_ND)
host_to_node_real_1(V_ball[m]);
host_to_node_real_1(b_ctr);
host_to_node_real_1(tmsize);
}
DEFINE_RW_FILE(writer,fp)
{
#if !RP_NODE
int m;
usrloop(m,ND_ND)
fprintf(fp,"%en",V_ball[m]);
fprintf(fp,"%en",b_ctr);
fprintf(fp,"%en",tmsize);
#endif}
DEFINE_CG_MOTION
(body_motion,
cg_omega, dt, cg_vel, time, dtime)
{
/* Reset velocities */
NV_S(cg_vel, =, 0.0);
NV_S(cg_omega, =, 0.0);
/* Assign the linear velocity */
cg_vel[0] = V_body[0];
}
61. 61
Moving and Deforming Mesh + Variable Time Step (7)
X_CG comparison
-2
-1
0
1
2
3
4
5
6
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
time (s)
x_cg(m)
old-x_cg[0]
srl-var-x_cg[0]
old-x_cg[1]
srl-var-x_cg[1]
old-x_cg[2]
ser-var-x_cg[2]
Store Separation
Comparison of coordinates
of CG with and without UDF
CPU time spent on single
processor:
3 days – without UDF
1.5 days – with UDF
63. 63
User Defined Memory (UDM)
User-allocated memory
Allow users to allocate memory (up to 500
locations) to store and retrieve the values of
field variablesfield variables computed by UDF’s (for
postprocessing and use by other UDFs)
Same array dimension and size as any flow
variable
More efficient storage compared to User
Defined Scalars: UDMs are not solved for
Number of User-Defined Memory Locations
is specified in the User-Defined Memory
panel
Accessible via macros
Cell values: C_UDMI(c,t,i)
Face values: F_UDMI(f,t,i)
Saved to FLUENT data file
500500
64. 64
User Defined Memory
DEFINE_ON_DEMAND(scaled_temp)
{
Domain *domain = Get_domain(1);
/* Compute scaled temperature store in user-defined memory */
thread_loop_c(t,domain)
{
begin_c_loop(c,t)
{
temp = C_T(c,t);
C_UDMI(c,t,0)=(temp - tmin)/(tmax-tmin);
}
end_c_loop(c,t)
}
}
65. 65
Filter Blockage (8)
• Trap of particles within a porous filter and analysis of the dust build
up influencing the flow
• The trapping of particles is stochastic, which would imply using many
runs and finding where particles get stopped
• A simpler approach is possible
• A porous region is defined as the filter in a Cylinder
• Particle tracks passing through this region are not stopped but their
flow rate is decreased to represent expected probability of a particle
being present
• This approach means that the flow can be run as a series of quasi
steady runs with gradual build up of the blockage effect
66. 66
Filter Blockage (8)
The following UDFs will be needed:
DEFINE_DPM_LAW
Identifies when Discrete Particle is within area assigned to
filter
Inside the filter, decreases mass flow rate based on particle
time to model decreased probability of particle caought by
filter
Stores into USER Defined memory decrease in mass flow
rate of particles
DEFINE_DPM_DRAG
Modifies particle Re number in drag law inside the filter. Re
number should be increased because physical velocity of
continuous fluid is higher due to porosity
67. 67
• A UDF will also get run if you are just displaying the Particles
• The parameter “coupled” is true for flow-coupled DPM iterations, but false
for post-processing with “particle tracks”
• DPM_LAW is run once after every drag run
• Energy must be enabled for a UDF Law to be run
DEFINE_DPM_LAW(dpm_law,p,coupled)
{ real pos[ND_ND];
real old_flow_rate;
cell_t c = P_CELL(p); /*pointer to cell where particle is*/
Thread *t = P_CELL_THREAD(p); /*pointer to cell thread where particle is*/
C_CENTROID(pos,c,t);
if((pos[2]>ZMIN)&&(pos[2]<ZMAX)&&(pos[0]<XMAX))
{old_flow_rate= P_FLOW_RATE(p);
P_FLOW_RATE(p) = old_flow_rate*
pow(TIME_EXP, -(P_TIME(p)-P_TIME0(p))/TIME_CONST);
C_UDMI(c,t,0) += old_flow_rate-P_FLOW_RATE(p);
}
}
Filter Blockage (8)
( ) CONSTTIMEoldtnewtold
p
new
p EXPTIMEmm _/__
_
−−
⋅= &&
68. 68
As a small addition to this model we can modify the drag to take into account the effect
of the higher true flow speed in the porous region
DEFINE_DPM_DRAG(drag,Re,p)
{
real Cd=1.0;
real pos[ND_ND];
cell_t c;
Thread *t;
c=P_CELL(p); t=P_CELL_THREAD(p);
C_CENTROID(pos,c,t);
if((pos[2]>ZMIN) && (pos[2]<ZMAX) && (pos[0]<XMAX))
{Re*=2.0 - BLOK*C_UDMI(c,t,0);} /*flow speed higher in porous region*/
return 18.0*Cd*Re/24.0;
}
Filter Blockage (8)
69. 69
Filter Blockage (8)
The particle tracks below are colored to show the flow rate of dust
(in kg/s) along each path line.
Note how the tracks passing through the filter decrease in flow
rate. The particles themselves are the same size and mass, just
the rate or “Strength” is decreased
70. 70
Filter Blockage (8)
• The rate of material buildup can be stored in a UDM location
• This value can then be used to vary the resistance of the porous
region using a momentum source UDF
• Dust build up shown on the computational cells
71. 71
Erosion Model Customization (9)
• Fluent6 already has a erosion model
• A tutorial is available
• This UDF essentially illustrates how to customize
erosion modeling in Fluent using DPM hooks
• Erosion rate is a function of
• Angle of impingement
• Impact velocity
• Particle diameter
• Particle mass
• Collision frequency between particles and solid
walls
• Material type
72. 72
Erosion Model Customization (9)
m : mass flow rate of the particles
f(α): function of impingement angle a
V : impact velocity
b : velocity exponent
C(Dp): function of particle diameter
R
m C D f V
Aerosion
p p
b V
facep
N particles
=
•
=
∑
( ) ( ) ( )
α
1
Reflecting Walls
Reflection Coefficient: en=v2,n/v1,n
a1 a2
Reflecting Walls
Reflection Coefficient: en=v2,n/v1,n
a1 a2a1 a2
0
0.2
0.4
0.6
0.8
1
1.2
0 10 20 30 40 50 60 70 80 90
Impact Angle (α)
f(a)
Relationship between the impact
angle and function f(α)
73. 73
Erosion Model Customization (9)
The following UDFs will be needed:
DEFINE_DPM_EROSION
Calculates erosion rate as prescribed by equation
74. 74
Erosion Model Customization (9)
#include "udf.h"
#define DEG_TO_RAD(x) ((M_PI*x/180.0))
DEFINE_DPM_EROSION
(custom_erosion, part, t, f, n, theta, vel, mdot)
{real er, f_theta, Avec[ND_ND];
real A = 1e-9,a=30,b=-34.79,c = 12.3,n=1.73;/*model constants*/
a = DEG_TO_RAD(a);
if (theta <= a)f_theta = b*theta*theta + c*theta;
else { /* You may add newer erosion models */ }
/*Removed mass per unit area per unit time (kg/m2s*/
er = A*pow(vel, n)*f_theta;
F_AREA(Avec, f, t);
er *= mdot/NV_MAG(Avec);
F_STORAGE_R(f, t, SV_DPMS_EROSION) = er;
}
75. 75
Erosion Model Customization (9)
• Remember also to set up DPM
properties on wall
• Reflection coefficients for tangential
and normal components
• Also provide the erosion model data
• Impact angle
• Velocity exponents
• Diameter function
76. 76
Closure
In this lecture we have shown several examples of application of
UDF to real world problem
Emphasis was given on strategy of UDF implementation, i.e., which
macros were used, how macros exchanged information etc.
The examples customized boundary conditions (surface and fluid
zones), DPM, multiphase momentum exchange, parallel issue,
moving and deforming mesh, customized time step and other
physical and numerical aspects of models
Special thanks to Fluent staff who contributed to this lecture
Adam Anderson (Fluent Europe)
Xiao Hu (Fluent Michigan)
Shitalkumar Joshi (Fluent India)
Rafi Khan (Fluent New Hampshire)
Sutikno Wirogo (Fluent New Hampshire)