COMSOL Multi Physics Flow Simulations

You might also like

Download as pdf
Download as pdf
You are on page 1of 67
COMSOL we MIULTIPHYSICS’ © Capture the Concept Multiphysics Flow Simulations with COMSOL Multiphysics John Dunec COMSOL SOLA, Cophar te Coma ) — FSI — Couple Flow and Structures * Three Physics: Flow, Structures, ALE Moving Mesh “8 COMSOL Sia , FSI Examples - Poroelasticity + Fluid Pressure & Structural Support Load + Collapsing Structure Slows Flow Rate “a COMSOL Thin Film Flow — Acoustic — Structural + MEMS Directional Microphone * Acoustic — Structure — Squeeze film Damping Model Courtesy of Prof G Karunasiri, Lt. T. Shivok, Naval Postgraduate Scheol <8 COMSOL Sometimes You Can Avoid a Moving Mesh + Anywhere you can type a number — you can type an equation GATE VALVE * Represent valve with extremely high viscosity Make high viscosity position a function of time + Here plotting viscosity ome <8 COMSOL Link Chemical Reactions, Flow & Diffusion Species A Pipette On Right ols + Navier Stokes Flow + Darcy Porous Flow + Fickian Diffusion + Chemical Reaction rs _Specles A+2B —C O35 Microfluidic Valve ' * Navier Stokes Flow + Fickian Diffusion + Electrokinetic Diffusion Species a CUMSUL ElectroOsmotic Mixer + Pressure Driven & ElectroOsmotic Flow i + Coupled Flow and Diffusion * Goal: Improve Microfluidic Mixing ‘No Mixing ae Mixin = ElectroOsmotic Mixing vel i Vy sin(wt ee >E)” sini(wt ) Concentration vel oh — Vp Sin on e sintat} Xe COMSOL Fuel Cells — Multiphysics by Nature Fuel Cells in General + Electro Chemistry + Heat + Flow Slice Plots of Velocity through Transparent Boundary Plot of Concentration Stress from Thermal & in Fuel Cell Stack External Loading mg COMSOL Fuel Cell Electrochemistry Solid Oxide Fuel Cell . : ro + Electro Chemistry NON i aan 5 Deceeceniad . =ZE * Convection & Diffusion : pace 2\|s 5 z z a4 * Heat & Flow é Ela sd ‘ “2S ANODE ANODE CATHODE | CATHODE 5 § FUEL DIFFUSION: (DIFFUSION AIR, ‘CHANNEL LAYER LAYER CHANNEL wotous urounn| eonovs coun ee ie rm ri 3S 9 td —| 5 Uyia bi Flow Excerpted thon Wfociedling anc Design of Sofie Qoacle Fuei Gen Anode’, NEP oa Tseranis, Kooks, and Theodovopos COMSOL Conference 2006 a 7 <8 COMSOL Pesticide DeToxification in Groundwater Ring r= 25mm oe f Leidenfrost point 10000 Gover of Bolling Teurt~ Tyat (1 Water vapor, | atm Initial vapor pocket Heat: 105 Wim? 8 COMSOL Ink Jet — Level Set Use Time-dependent Adaptive Meshing Force Jet with Velocity Pulse atl! mg COMSOL Ink Jet > Note Satellite Drop Formation & Striking Paper YA <8 COMSOL Drop Formation - ALE + 2 Phase Flow (Ink in Air) * Moving Mesh {lt <8 COMSOL Particle Tracing - Room Contamination * Convection Dominated diffusion lead to numerical instabilities + Use Particle Tracing Module instead + Particle Release in Hallway Paice How much gets into office? Air Velocity <8 COMSOL Worked Example — 3D Reaction Chamber “a COMSOL Process Engineering: Chemical Decomposition Research Division has a simple proof-of-concept model Bee ame LH f+) O Flows Heater t) Concentration of ‘A’ + Air flow carries a dilute chemical, A * Reaction takes place that converts A to B,... C, etc + Chemical reaction triggers when temperature above 350K Reaction is Exothermic — further increasing temperature <8 COMSOL Production Version Questions We are charged with designing the production version: + How much does an upstream 90 degree bend affect the flow? + What wattage for the heater? + How even is the heat? * Does any of this matter to the reaction? + What's the production yield from the reaction exiting the chamber? <8 COMSOL Use COMSOL Multiphysics to Answer Three Physics: + Navier-Stokes flow * Heat Transfer in Fluids (and Solids) + Transport of Dilute Species ... (Fickian Diffusion) Modeling Approch: * Solve for Flow * Solve for Temperature (Based on Flow - typical to save memory) + Parametrically vary heater power + Solve Coupled Thermal — Mass Diffusion (Based on Flow) * Finally Solve Fully Coupled Flow-Heat-Mass <8 COMSOL Before Doing Flow — Check a Few Numbers . . . Is the flow Turbulent? Ifso... need turbulence model for flow Also, turbulent mixing for heat and diffusion Airflow in 12” Duct = Dyyg ~0.3[m] Vive = 0.1 mis ALMOST Turbulent Re = i Will the Heater shed transient vorticies? . . . If so — NO stationary solution — only transient Dheater = 9.5" = 13[mm] Re based on Dheater is 138 Re> 40 so ...Vortex street possible = 3300 <8 COMSOL Select Space Dimension = = COMSOL Setup 2D axisymmetric ao Add Physics 10 axisymmetric " ta * New>3D 10 ‘\ Recently Used * . 00 %& acwoc + Add Physics > Flow 9) Acoustics . Eg Chemical Species Transport + Study: Stationary > Electrochemistry Sy Turbulent Flow == Creeping Flow (spf) Select Study Type | Sp Retating Machinery, Fluid Flow Thin-Film Flow Studies i Multiphase Flow ® Preset Studi (© Porous Media and Subsurface Flow ——— 5S Non-lsothermal Flow = = 55 Migh macn umber Fiow ‘dy Time Dependent woe Rarefied Flow S Custom Studies mg COMSOL aa - Default Model Tree Built — Import Geometry * Change units to inches Right Click on Geometry * Choose “Import” Bring in Geometry from CAD eee ee °at Wall 1 Scale values when changing units » Advanced Geometry representation: Default relative repair tolerance: leo “8 COMSOL Set Materials - Air * Rt Click on Material * Choose “Open Material Browser” > Select “Air” * Can Also define your own materials (TE Model Builder = ©) Material Browser | ¢ Materials 3 Untitled.mph (root) Search © Global Definitions a 4 Modell (mod @ Recent Materials Ls lel 1 (rod) 1D Material Library = Definitions = eometn, Air Materials Acrylic plastic ® Alumina ® Aluminum 3003-H18 ® Aluminum 6063-783 = Laminar Flow (spf) dp & Aluminum Se Study 1 ® American red oak am ComsoL (Bi Results ‘® Beryllium copper UNS Cl ~ Set Flow Regime, Correct Inlet and Outlet "ty Mode Builder * Highlight “Laminar Flow” + De-select heater domains * Rt click on “Laminar Flow’ + Choose “Inlet” * Pick inlet boundary * Set V=0.1[m/s] + Rt click on “Laminar Flow * Choose “Outflow” * Pick outlet boundary + Set P= O[P] “a COMSOL Mesh — Physics Controlled Mesh * Highlight Mesh > Leave at default * Size: Coarse (faster solution) SSSA | RRORALS BD Rees See Pennbes ee ‘TT Model Builder 1 Untitled.mph (root) Global Definitions i Medal (rea) = Definitions JA Geometry 2 1 Materials Laminas Flow feof) =o 8 Settings» [I Model Library @ Mesh ~ Mesh Settings Sequence type: Physicé-conteolled mesh Element ze: Coarse mg COMSOL Solve for Flow + Rt Click on “Study 1” * Pick “Compute” + Solving for u,v,w,p + 191,000 DOF + Takes 9 minutes to solve (~1.6 Gbyte) "TD Model Builder =a e "S's Et Bh \@ Untitled.mph (root) = Global Definitions Wi Model 1 (moo) = Definitions JA Geometry 1 @ Materials Parametric Sweep Study Steps ' The Show Default Solver @ Rename 2 EL Properties Dynamic Help A <8 COMSOL Review Results * Flow much faster on far side mg COMSOL Add 2"4 Physics - Heat * Rt Click on “Model 1” * Choose “Add Physics” + Add “Heat transfer in fluids” + Set up Wattage as a Parameter * Rt Click on “Definitions” * Choose “Parameters” + Setup two: T_in, HeaterPower Add Physics 1) Acoustics fg® Chemical Species Transport (oll Electrochemistry = Hui How 4 ji) Hest Transfer Ry Heat Transfer in Solids (ht) | Heat Transfer in Fluids (ht) 182 Heat Transfer in Porous Media (ht) {Il Bicheat Transfer (ht) \( Heat Transfer in Thin Shells (htsh) \& Conjugate Heat Transfer (WE Radiation ‘x)| Electromagnetic Heating @ Plasma ° Parameters y Parameters Name. Expression HeaterPower —15[W] Tin 300(K] <8 COMSOL Set up Heat Transfer in Heater itself * Rt Click on “Heat Transfer” * Choose “Heat Transfer in Solids” + Select the Heater domains * Rt Click on “Heat Transfer” + Choose “Heat Source” + Select the Heater domains * Enter Power as “HeaterPower” a hn any) trae Heat Source B Panes Domain Section 8 ede foot . Ontos sence ana = Aion fe N+ Ss Laminar Flow (spf) t . (88 Heat Transfer in Fluids (ht) + 25 Heat Transfer in Fluids 1 °g) Thermal Insulation 1 £5 Initial Values 1 © Heat Transfer in Solids 1 3 Ucat Svuive & Mesh <8 COMSOL Link Heat Convection to Fluid Flow, Set BC’s SS Laminar Flow (spf) {8% Heat Transfer in Fluids (ht) an “ : : ” 2S Heat Transfer in Fluids1 * Highlight “Heat Transfer in Fluicls 1 a Thermal insulation! . 7 . Fi £5 Initial Values 1 + Set Velocity Field to Navier Stokes Solution £5 Heat Transfer in Solids 1 Temperature? + Rt Click on “Heat Transfer in Fluids” Ea © Meshd + Choose “Temperature” + Select Inlet boundary * Set T to “T_in” + Rt Click on “Heat Transfer in Fluids” * Choose “Outflow” + Select Outlet boundary “8 COMSOL Run Heat, Based on Flow * Could Run Simultaneously * Set up for Fast design study + Rt Click on top node * Choose “Add Study” + Choose “Stationary” + Pick Stationary Solver + Only Solve for Heat + Use flow results from previous study i= Stationary ~ Study Settings » Results White Solving + Mesh Selection, Geometry Mesh Geometry t Mesh. ~ Physics Selection isetetization hysics settings: Physics settings hm . > Extension + Values of Dependent Variables 7] Values of variables not solved for Mathes: [Eelation - Study: [Study 1, Stationary =) (|S Stationny: [Automatic : <8 COMSOL Solve for Heat * Rt Click on Study 2 + Pick “Compute” * Solving for T 48,000 DOF (~1 Gbyte) * Takes 52 sec SE <8 COMSOL What if Flow is Turbulent? Heat (and Mass) Transfer must account for: Highlight “Laminar Flow’ Physics Choose your Turbulence Model k-epsilon, k-omega, low Re k-epsilon, ... Enhanced mixing from turbulent eddies Heat Transfer Boundary Conditions: Need Proper thermal gradient at wall from laminar sublayer All of this done for you if choose “Non-lsothermal Flow’ predefined multiphysics ~ Physical Model Compressibility: | Compressible flow (Ma<0.3) Turbulence model type: RANS: = Physical Model Turbulence _ Compressitility ‘Compressible flove (Ma<0.3) Turbulence model type: kee None Add Physics 4 5S Fluid Flow Se Single-Phase Flow 1 Thin-Film Flow i Muttipnase Flow Porous Media and Subsurface Flow Turbulent Flow High Mach Number Flow 2 Rarefied Flow 3 Particle Tracing for Fluid Flow (fpt) ig op Fluid-Structure Interaction (fsi) (Heat Transfer mg COMSOL Set up Average, Minimum & Maximum * Rt Click on “Definitions” * Choose “Model Couplings” + Pick “Average” + Select the Heater Boundaries + Do same for “Minimum” + Do same for “Maximum” + Do again for “Average” * This time for Outflow boundary 4 Model (moet) 2 & Definitions Oy Average 1 (Ave Heater) Maximum 1 (ax Heater) Ay Minimuns 1 (Min, Heater) Ay Average 2 (Ave Outflow) g, HesterBoundaries UE! Boundary System 4 (syst) 2 Views. Geometry 1 4» Average = Operator Name Source Selection Geometric entity levet [Boundary Selection: HeaterBoundaries 10 * + nu * _ 1B =) 4) 34 ha 16 e a . 18 29 - ~ Advanced Integration orden: 4 Frame: Spatial (xy. 2) = <8 COMSOL = Compute @ Update Solution Parametrically Sweep Heat ar iy [rs Show Default Solver * Rt Click on Study 2 « : ” Te all Pr + Add “Parametric Sweep “ emperaureys Power + Choose “HeaterPower” + Range from 10 to 30 by 5 + Plot Heater Min, Ave, Max » vs Power ’ » y-Asds Data um Expression Unit Max_Heater(T) Ave_Heater(T) Min_Heater(T) Ave_Outflow(T) Max Temperature on Ave Temperature on Heater Exceeds 360 Heater Exceeds 360 RRA <8 COMSOL Simulation Provides Insight * Non-uniform convection flow leads to non uniform temperature profile on heater Une Graph: Temperature 00. Une Graph: Temperature (Xd 20 Watt Case Trailing Midline Edge View of Trailing Surface tanpt 80 I 335 Leading Midline Edge View of Leading Surface Add 3" Physics: Mass Convection-Diffusion * Rt Click on Model 1 > Add Physics Aad Physics * Chemical Species Transport > wi) Acoustics Transport of Dilute Species ce Reactions tekst) A . Transport of Diluted 5, ds * Name Variable: c_A ‘il Trensport of Concentrated Species (ches) TTT So eid Nemst-Planck Equations (chnp) a ©) Solute Transport (esst) 4 \9 Fluid Heat Reaction.mph (root) 8) Species Transport in Porous Media (chpm) = Global Definitions sb: Reaction Engineering (re) 4 () Modell (modi) gel Reacting Flow, Cunceritrated Species (ifes) = Definitions i Reacting Flow, Diluted Species (rfds) JA Geometry 1 igh Blectrochemistry ‘© Materials St Fluid Flow » Vi Heat Transfer amunar OW [SP7) ~ Dependent Variables Number of species: L Concentrations: cA <8 COMSOL Link to Flow, Set Diffusion Constant * Highlight “Convection & Diffusion 1” ~ Mode! Inputs Velocity field: * Set Velocity to “Velocity field” U (Velocity field (spf/fpt) | =) + Set Diffusion coefficient to 2e-9 ~ Diffusion Diffusion coefficient: E Laminar Flow (spf) m/s Be Heat Transfer (ht) [§ Transport of Diluted Species (chds) Isotropic z =) No Flux1 =”) Initial Values 1 SB Mesh1 3) Study 1 se dy “8 COMSOL Limit Diffusion to Flow Domain, Set BC’s > <= Laminar Flow (spf) > {88 Heat Transfer in Fluids (ht) + Highlight “Transport of Dilute Species” 4 e£t Trensport of Diluted Species ches) * Select only the Air Domain (not Heater) Sue ‘2 Initial Values 1 a Inflow 1 + Rt Click on “Transport of Dilute Species” ea * Choose “Inflow” S suay + Select Inlet boundary a - _ eS * Rt Click on “Transport of Dilute Species” "seo a= * Select Outlet boundary “8 COMSOL Heat Reactions A> B+CH+--- Rate proportional to product of concentration of reactants Proportionality constant is exponential function of temperature! : mol me A Munerical A Reaction Rate reli. CaTamey = Ca cay a >0) Heat produced by reaction is proportional to reaction rate vention 4 = H x (Reaction Rate) AY Exothermic : Possibility of a run-away reaction: More Heat — Higher temperature — Yet faster reaction — Yet more heat — Yet higher temperature ... Kaboom! xm COMSOL a= Variables Geometric Entity Selection . Geometric level: | Entire model ~ Set up Reaction ™ + Variables Mone) Speadion . Description + Rt Click on “Definitions” a AelolLis} Frequency factor E 72fkj/mol] Activation energy Rxfate — ke*e_A*{e_A>0) ° Rate of Reaction + Enter Reaction Variables 7 THOTT me Heat of Reaction Rx_Heat HPRx_Rate/10000 Reaction Heat Production A Rs_Rate — © a SERRE * Ca » 0) & Laminar Flow (sp) \A# Heat Transfer in Fluids (ht) . es . - 4 af! Transport of Diluted Species (chds) * Rt Click on “Transport of Dilute Species £5 Convection and Diffusion 1 * Choose “Reactions” a) No Flux1 : 25 Initial Values 1. + Enter *-Rx_Rate” for Reaction c_A = Inflow Outflow + Reactions & Mesh1 oS Study 1 Rea[amrte] ——SSSimimtsy SY mg COMSOL Set up 3% Stationary Study (not parametric) * Rtclick on top node > Add Study Physics Selection + Choose “Stationary” ——— peeitin Heat Transfer in Fluids (ht) Physics settings Transport of Diluted Spec... Physics settings + Solve only for Heat and Diffusion + Use Flow result from Study 1 » Extension + Values of Dependent Variables (¥) Values of variables not solved for * Open Global Definitions > Parameters | sence: {soition J + Set Heater_Power to 20[W] study: (Study, Stationary =) () Stationa (Automatic aI oa 2 (@ Duct V.mph (rect) 4 © Global Dafinitione Pi Parameters WE Model 1 (moa) ?| Parameters S cena © Parameters dy 2 Parametric in Power « & Study3 IE Step 1: Stationary Name Expression HeaterPower _201W] ‘a COMSsOL Run Diffusion & Heat, Based on Flow Rt Click on Study 3 Hit “Compute” NOTE: Not Yet Exothermic! Solving for T, c_A 96,000 DOF (~1.6 Gbytes) About 5 min <8 COMSOL Reaction is Exothermic = Laminar Flow (spf) * RtClick on Heat Transfer 4 (ag Heat Transfer in Fluids (ht) ~ Heat Source + Add 2" Heat Source 2 Heat Transfer in Fluids 1 . "im Thermal Insulation 1 @ General source * Choose Flow Domain 85 Initial Values:1 + Enter Qas “Rx Heat” Heat Transfer in Solids 1 - Heat Source 1 so) Temperature * Solve Study 3 again #) Outflow 1 F [\ Heat Source 2] + Really nonlinear now! PeeiSauces a? Transport of Diluted Species (chds) One-way Coupling in Flow, Heat & Mass Bi-Directionally Coupled + Mass and Heat depend on flow + Mass production exponentially dependant on temperature * Reaction produces heat — increasing mass production “a COMSOL Concentration - With & Without Heat of Rx Slice: Concentration {molin") Arrow Volume: Velocity field : enna len” With Heat of Reaction _ L., Average c_A at Outflow = 400 molim? Slice: Concentration molim’) Arrow Velume: Velocity field ea NO Heat of Reaction L Average c_A at Outflow = 459 malim? — 300 mg COMSOL Actually All Physics are Coupled ~~ ssi Temperature: Higher temperature reduces viscosity 7 (Temperature (his) Air expands as it heats — velocity increases in duct Absolute pressure: P ([Dressure (spt/fpl) Flow defaults to “weakly compressible” PAE P* Prt Open Laminar Flow > Fluid Properties Link materials temperature to “T” 7) Reference pressui Pref [ata] + Physics Selection Rerun Study 1 Solving for u,v,w,p, T, c_A Physics interface Discretization 287.000 DOF | Laminar row (spt) Physics settings , | Heat Transfer in Fluids (ht) Physics settings (~5.3 Gbyte) | Transport of Diluted Species (ch... Physics settings Very nonlinear 8 COMSOL Flow — Heat convection — Mass diffusion Heater = = = Temperature 38 COMSOL Concentration COMSOL Multiphysics * True Multiphysics — Everything can link to everything * Flexible — You can model just about anything. + Usable — You can keep your sanity doing it. «+ Extensible — If its not specifically there... add it! Trusted by 60,000 Users World Wide <8 COMSOL Upcoming Workshops North America Logan, UT Pittsburgh, PA Baltimore, MD Milwaukee, WI Berkeley, CA Minneapolis, MN Vienna, VA Burlington, MA Flint, MI San Jose, CA San Marcos, CA Houston, TX Rochester, NY Europe Trondheim, Norway Talence, France Vélizy, France yer = Helsinki, Finland eee Trento, Italy ¢ Paris, France Berlin, Germany aq Prague, Czech Republic Sheffield, UK Newcastle, UK Eindhoven, Netherlands Free hands-an minicourse! www.comsol. com/events <8 COMSOL COMSOL a MULTIPHUSICS: © : Capture the Concept” mg COMSOL

You might also like