Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Mfix M. Syamlal, Fluent, Inc. National Energy Technology Lab Morgantown, WV 26507-0880.

Similar presentations


Presentation on theme: "Introduction to Mfix M. Syamlal, Fluent, Inc. National Energy Technology Lab Morgantown, WV 26507-0880."— Presentation transcript:

1 Introduction to Mfix M. Syamlal, Fluent, Inc. National Energy Technology Lab Morgantown, WV 26507-0880

2 Outline Mfix overview Setting up a run Hands on example Numerical technique Mfix code Code modification

3 Mfix Overview Equations Validation problems Application

4 Setting up a Run Mfix user interface Input data file: mfix.dat List of keywords Array dimensions: param.inc file Compilation: make_mfix Running Mfix Debugging setup: read.Log and.Out files

5 Setting up a Run Run time messages Obtaining convergence Output data files:.Res and.Spx Viewing output graphically: animate_mfix Creating data tables: post_mfix Restarting the run

6 Hands on Example A slurry flows into a 20 cm x 20 cm cavity through a 2 cm slot at the top left hand side and exits through a 2 cm slot on top right hand side. Simulate the cavity using a 20x20 grid. Find the solids build up in the cavity as a function of time for 10 s.

7 Hands on Example Vel = 100 cm/s  = 0.7 fluid density= 1g/cc fluid viscosity= 0.01 g/(cm  s) solids density = 2 g/cc particle dia.= 0.1 cm e= 0.8   *= 0.4

8 Numerical Technique Numerical grid Scalar transport equation Iteration procedure Momentum equation discretization Pressure correction equation Underrelaxation

9 Numerical Technique Solids volume fraction correction Energy and species balance equations Calculating residuals and judging convergence Linear equation solvers

10 Mfix Code Directory structure Types of files:.f,.inc, default files, machine dependent files Examine make_mfix Naming conventions: coordinates, variables, storage locationNaming conventions: coordinates, variables, storage location List of major Fortran variablesList of major Fortran variables

11 Mfix Code List of functions: function.incList of functions List of include filesList of include files List of subroutinesList of subroutines Examine.inc file structure Examine.f file structure

12 Mfix Code walk through a solver thread –mfix  time_march  iterate  solve_velstar  conv_dif_u_g  source_u_g  partial_elim_u  calc_resid_u  under_relax_u  solve_lin_eq  leq_sor reading input data file and error checking initial and boundary condition routines writing.Res and.Spx files

13 Code Modification An equation for modeling particle attrition tracks the mean particle diameter

14 Code Modification Create new Fortran symbols and add to common blocks –field variables: d_s, d_s0 (fldvar.inc) –constants: a_1, a_2 (constant.inc) –initial conditions: IC_d_s (ic.inc) –boundary conditions: BC_d_s (bc.inc) –control: Attrition_Eq (run.inc)

15 Code Modification Add new symbols in namelist –a_1, a_2, Ic_d_s, Bc_d_s, Attrition_eq in namelist.inc –initialize namelist variables in init_namelist.f Check for input errors (a_1  0, Ic_d_s  0, and Bc_d_s  0) Set initial conditions for d_s Set boundary conditions for d_s

16 Code Modification Modify update_old to include d_s0 Increase the dimensions of variables defining under relaxation factors, number of linear equation iterations, residuals, residual display variables, and N_spx Modify write_out to echo new input data Modify write_res and write_spx files to include d_s

17 Code Modification Copy the files for a scalar equation (e.g., T_s) and modify to create a solver for the attrition equation Call the new solver from iterate Include the effect of diamter change in drag_gs Modify residual calculation and convergence check

18 Code Modification use make_make to create a new make file Develop a test case and write mfix.dat and param.inc files Compile and test the code


Download ppt "Introduction to Mfix M. Syamlal, Fluent, Inc. National Energy Technology Lab Morgantown, WV 26507-0880."

Similar presentations


Ads by Google