Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ga75In25-3D-MHD-UDF

3D numerical simulation of liquid metal flow under RMF. Features a comparative study between a custom analytical Lorentz force UDF and ANSYS Fluent's built-in MHD module.

3D Numerical Simulation of Ga75In25 Flow under Rotating Magnetic Field (RMF)

Comparison of Analytical UDF and Full MHD Models
ESA-funded project – University of Miskolc
Author: Burak Yorukcu | Supervisors: Prof. Zsolt Veres, Prof. Haijie Zhang

📌 Overview

This repository contains the complete setup, simulation files, and post-processing results for the 3D numerical simulation of a Ga75In25 liquid metal flow subjected to a Rotating Magnetic Field (RMF). Two distinct modeling approaches are compared:

  1. Analytical UDF (Lorentz Force) – custom C-based user-defined function implementing the azimuthal Lorentz force.
  2. Full MHD Module – native ANSYS Fluent MHD model solving coupled Maxwell-Navier-Stokes equations.

Key outcomes include validation of spin-up characteristics, quantification of energy dissipation due to 3D Taylor-Görtler vortices, and identification of electrical end-effects near insulating boundaries.

🧪 Problem Setup

Geometry & Mesh

  • Domain: 90° sector of a cylinder (radius = 12.5 mm, length = 100 mm)
  • Mesh: Structured hexahedral, ~250,000 cells, wall refinement for Hartmann layer
  • Periodic Boundary: Rotational periodicity with -90° offset
Geometry Mesh Periodic Interface
geometry mesh periodic

Periodic settings detail: periodic settings

Material Properties (Ga75In25)

Property Value
Electrical conductivity (σ) 3.58×10⁶ S/m
Magnetic permeability (μ) 1.2566×10⁻⁶ H/m
Magnetic induction (B₀) 0.09 T (90 mT)
RMF frequency (f) 50 Hz

⚙️ Simulation Methods

Method 1: Analytical UDF (Lorentz Force)

  • MHD module disabled
  • Azimuthal Lorentz force implemented via DEFINE_SOURCE in C UDF (file: final_udf_B90_3D.c)
  • Force projected to Cartesian X/Z momentum equations
  • Output data: avgweqvel-rfilelorentz.out, swirlsonuc3d_udf.csv

Method 2: Built-in MHD Module

  • Maxwell’s equations coupled with Navier-Stokes
  • Magnetic induction / electric potential approach
  • Complex phase shifts: B_x = 0.09 T, B_z = 0.09 T with 90° phase shift
  • All walls electrically insulating
  • Output data: avgweqvel-rfile_mhd.out, swirl.mhd.csv

📊 Key Results

Velocity & Turbulence (Steady-State)

Parameter UDF Method MHD Module Difference
Max Velocity Magnitude (m/s) 1.74 1.77 < 2%
Max Turbulent Kinetic Energy (m²/s²) 0.0501 0.0487 ~2.8%
Max Turbulent Intensity (%) 18.3 18.0 ~1.6%
Max Vorticity Magnitude (s⁻¹) 3.53×10⁴ 3.42×10⁴ ~3.1%

Note: The reduction from the 2D theoretical value (~1.88 m/s) confirms energy dissipation by 3D secondary flows (Taylor-Görtler vortices).

Spin-up and Convergence

Average velocity vs flow time Lorentz residuals

Velocity Fields Comparison

UDF – Velocity Magnitude MHD – Velocity Magnitude Swirl Comparison
vel_lorentz vel_mhd swirl

Secondary Flows & End-Effects

Pathlines (UDF) Pathlines (MHD) Taylor-Görtler (UDF)
path_lorentz path_mhd taylor2_lorentz
Taylor-Görtler (MHD) End-Effects (MHD) Turbine half (UDF)
taylor2_mhd (see MHD pathlines) turbin_half

Additional turbine view: turbin_half_png

The MHD model captures electrical end-effects (Hartmann braking) near insulating caps, leading to more regularized flow compared to the UDF model.

🚀 Getting Started

Prerequisites

  • ANSYS Fluent 2023R1 or later (with MHD add-on module)
  • C compiler (for UDF compilation)

Running the Simulations

UDF Model:

# Compile UDF in Fluent
/define/user-defined/compiled-functions compile
# Load final_udf_B90_3D.c
# Enable source terms in cell zone conditions

MHD Model:

# Enable MHD module
/define/models/mhd? yes
# Set magnetic boundary conditions (insulating walls)
# Apply phase-shifted B-field (0.09 T, 90° shift)

Post-Processing

Use provided .csv and .out files to regenerate velocity/turbulence plots.

For pathlines and vector fields, load the corresponding .cas and .dat files (not included due to size; contact author).

Validation & Convergence

Mesh independence study performed (250k cells optimal)

Spin-up curves show stable acceleration to steady-state

Residuals indicate convergence below 1e-5

Next Steps

Integrate solidification models with validated MHD settings

Extend thermal analysis for continuous casting applications

Quantify Hartmann braking effect on global flow efficiency

Contact

Burak Yorukcu – Graduate Researcher, Space Engineering University of Miskolc Email: burak.yorukcu@student.uni-miskolc.hu , burakyorukcu@outlook.com

Supervisors: Prof. Zsolt Veres, Prof. Haijie Zhang

About

3D numerical simulation of liquid metal flow under RMF. Features a comparative study between a custom analytical Lorentz force UDF and ANSYS Fluent's built-in MHD module.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages