himag - a 3-d mhd solver for free surface flows hypercomp ...himag - a 3-d mhd solver for free...

Post on 07-Mar-2020

14 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

HIMAG - a 3-D MHD solver for free surface flows

HIMAG : HHHHyPerComp IIIIncompressible MMMMHD solver for AAAArbitrary GGGGrids

Primary code objective:To obtain 3-D MHD solutions for incompressible flows with free surfaces

Principal code features:

• Parallel iterative solver, based on well developed base codes in CFD and CEM• Can use an arbitrary mesh structure, to resolve interfaces and complex geometry• Facility to use Volume of Fluid and Level Set methods for free surface capture• Implicit methods to ease stiffness and time step constraints

• Choice of 3-D MHD models: ϕ formulation and J-formulation

Team members: HyPerComp, Inc., Fusion Group at UCLA,Dr. Ali Hadid (Boeing)Sponsored by DoE as a Phase-II SBIR,contract # DE FG03-00ER83022

3-DUnstructured and hybrid meshesParallel processingGraphical interfaces

Implicit incompressible flow solverColocated data storageLevel set technique for free surfaceMultiple MHD models

InductionlessCurrent / Induced field Hybrid

Adaptive meshing for higher accuracy

Existing technology, adapted to current application

Feature development

Development and validation of HIMAG - 1

Code attributes

Main

Driver

Parallel data initialization •Upload / Download Input• Upload/Download Mesh• Upload/Download BCs• Upload/Download Patches• Prepare Grid• Memory allocations

Synchronize MPI

Solver Input/Output, restart files

Statistics, Post-processing

Mesh adaptation, repartitioning

Parallel task assignment

Pre-processing• Model Geometry Definition• Mesh Generation• Mesh partitioning for multiple processors (KMETIS)

Structure of the HIMAG Solver

3-D Eddy current analysis : Summary of techniques

Legend:

A : Magnetic vector potential B = curl (A) A* : Modified A : A* = A + Ú grad φ dtφ : Electric scalar potential E = - ( ∂A/∂t + grad φ ) T : Current vector potential J = curl (T)W : Magnetic scalar potential H = - grad W µ : mag. perm., n = 1/ µ, σ = elec. cond.

A - f

A - f - W

A* - W

T - W

E - W

curl (n curl (A)) = -σ ( ∂A/∂t + grad φ )

div (-σ ( ∂A/∂t + grad φ )) = 0

curl (n curl (A)) = 0

curl (n curl (A*)) = -σ ( ∂A*/∂t)

curl(curl (T)/ σ) = - ∂/∂t (µ( T - grad W ))

div ( µ( T - grad W ) ) = 0

curl (n curl ( E )) = -σ ( ∂ E / ∂ t)

div(- µ grad W) = 0

A fA

A fW

A*W

T WW

EW

Formulation variable location in the current carrying region current free region

J ≠ 0

J = 0

Separate regions for storing variables :

(Stationary media)

curl ( ν curl (A)) + σ ( grad φ + ∂A/ ∂ t - V × curl (A) ) = Jo

div (σ ( grad φ + ∂A/ ∂ t - V × curl (A) ) = 0

Using Coulomb’s gauge, ∇2 A - µ σ ( grad φ + ∂A/ ∂ t - V × curl (A) )= - Jo

Fem = σ ( grad φ + ∂A/ ∂ t ) × curl (A)

The A- φ formulation

div V = 0

ρ DV/D t = µv ∇2 V – grad p + ρ g + Fem + ρ KV

B = curl AE = - ( grad φ + ∂A/ ∂ t )

Boundary procedures:

B ⋅n and B ×n are continuous, J ⋅n = 0

Across interface At1 = At2

ν1 (curl A)t1 = ν2 (curl A)t2

Impedance BC n ×(curl A) = (1/Zs) n ×( n × ( i σ w A + σ grad φ))

Governing equations

A- φ equation set

Validation procedures

Incompressible flow solverSpatial accuracy:

Driven cavity Rearward facing step

Temporal accuracy:2-D Karman vortex shedding

Non-orthogonality of mesh:stretched triangular meshes

MHD solver:Spatial accuracy:

2-D and 3-D rectangular channel flows using B and ϕ formulations, fully developed flow

Time accuracy:MHD Vortex shedding

Free surface:TBD - suggestions welcome!

Time Loop t = t0 to tmax

Initialize: u, v, w, p, j, V, A at cell centers

Compute allowable dtInitialize mass flux at cell facesInitialize intermediate velocities (u*,v*,w*, etc.)

PN

nv

Sub-iterations between t and t + dt

Update state vector q = (u,v,w,p,j,V,A) at each cell center

For each interior cell face: Compute free surface and momentum flux-termsCompute Pressure Poisson flux-terms

For each boundary cell:Impose appropriate boundary flux

Update intermediate variables Use intermediate velocities to update potentials V,A

Repeat until t + dtquantities are converged(including BC values)

Schematic of Flow Solver

• To convert HyPerComp’s existing adaptive hybrid unstructured mesh environment to problems in liquid metal MHD with free surfaces.• Modular code structure to the extent possible, for hierarchical MHD treatment• Interaction with research groups (LANL, LLNL, FZK, etc.)• Commercial applications to metallurgy (MAG/GATE: Concept Engineering Group, PA)

Goals of HyPerComp’s phase-II SBIR research

HIMAG : “HyPerComp Incompressible MHD( HyPEX) Adaptive Grid ” suite of codes

containing High Power Extraction code environment for nuclear fusion

CAD/Grid generation

Domain decompositionPC-cluster based parallel computing

Code development status

The following systematic validation procedures have been carried out so far:1. Incompressible solver Spatial accuracy: Driven cavity problem, Rearward facing step Temporal accuracy: 2-D vortex shedding frequencies Grid-non-orthogonality: Compare results of above with stretched triangular cells2. MHD solver Assessment of J, B and ϕ formulations for channel flow problems 3-D square channel flows at a range of Hartmann numbers

Expected date for completion of this project: June 2003Expected date for completion of this project: June 2003Expected date for completion of this project: June 2003Expected date for completion of this project: June 2003

Flow in a square ductMagnetic field is ramped upfrom 0 to 1 at Ha = 1000,N = 1000

inflow

Region of B-gradientStreamline structure

3-D meshes used in 2-D problems

Driven cavity flow (Re = 1000)

3-D Tetrahedral and Hexahedral meshes

Adjustments for non-orthogonality

f

P

N

A

kD

d

DAk,AAd

dD −=

⋅= 2

Over-relaxed approach:

( ) fPN

fk

dD ϕϕϕϕ ∇⋅+−=∇⋅A

Treat non-orthogonal termsexplicitly in an iterative solver.

Locating face-based quantities to face-centers

P Nf

c

r1

r2 r3

d

[ ] 321

21

2

1r

A

NPNP

c

facescP

⋅∇+∇+++=

=∇ ∑

ϕϕδδ

ϕδϕδϕ

ϕϕv

Iterate.(2-3 stepssufficient!)

Highly stretched unstructured mesh

40 x 40 rectangular cells, each divided diagonally into 2 triangles

Uniform channel flow

Inflow: u = 4*y*(1-y)

( )500Re,04.010

50u on basedRe,8.002.0

40,5

8

3

max

2

2

=−=∆→=

=−=∆→=−=∆=∆

∆−=∆⇒∂∂=

∂∂

− p

p

pxif

xp

y

u

x

p

µµ

µµ

µ

Backward facing step flow at low Re

separation zonereattachment point

Inflow: parabolic u-profile

Re = Uavg*2*h*ρ/µ

Uavg = ("u dA)/Ah

h

Flow past a cylinder

Farfield: u = 1, v = 0, p = 0

Farfield: u = 1, v = 0, p = 0

Outflow:u,v extrapolatedp = 0

Inflow:u=1,v=0, dp/dn=0

Unstructured mesh with 20,000 cells

Time averaged separation region and the vortex street

Time evolution of lift and drag

Re = 100 Re = 200

Change in lift and drag with Re

Strouhal number computed on 3 grid levels

Grid-1

Grid-2

Grid-3

( ) ( ) ( )We

k

x

u

xFr

f

x

puu

xt

u

j

i

j

i

iji

j

i

ρφφδφµ

ρρ∇−

∂∂

∂∂+−

∂∂−

∂∂−=

∂∂

Re

11

0=∂∂

i

i

x

u

0=∂∂

+∂∂

ii x

ut

φφ

2 Fluid0

Interface0

1 Fluid0

<=>

φφφ

CSF Model

The level set technique in free surface flows

• Initiated by Osher and Sethian (1988)

• Quickly becoming popular among various interfacial modeling areas

• Produces mass conservation errors at extreme deformations (corrections exist)

• Applied to unstructured meshes recently (Tornberg, 2000)

• Greatly simplified reinitialization procedure for unstructured meshes (vs. VOF)

• Combination of VOF-level set exist that combine their strengths

the equation remains the interface unchanged.

Distance Function

Steady problem

0φφ

( )( )φφφ ε ∇−= 10signt

( ) ( )xxvv

00, φφ =

With the sign function, theoretically

has the same sign and zero level set as

1=∇φ

Away from the interfacewill converge to the actual distance.

HOWEVER

( )( )nnn signt φφ∆φφ ε ∇−+=+ 1001

1>∇φ

01 <⋅+ nn φφ

Discretized redistance equation

For the case of

It is very possible

Mass is not conserved

1,00 >∇> nφφ

10 −∇>∆

n

n

tφφ

0t∆ constant

φ

Reinitialization equations

( ) ( )( )[ ] ( )( )( )( )∫

∫+++

=′ijk

ijk

aaasgn

asgnt

Ω

Ω

φφδ

φφδ∆

420

2

0

0111

( ) 11 00 −∇=′−= naattt φ∆∆∆

( )( )nnn tsign φφφφ ε ∇−∆+=+ 101

By preserving the volume of the bubble

Variable time step method

3-D cylinder in a channel - test case under study

Construction of current-free B distributions

• The applied field B0(x,y,z,t) must satisfy: div(B0) = 0 and curl (B0) = 0 such that there are no imposed currents.

• B0 can then be derived from a scalar potential such that B0 = -—j and —2j = 0

e.g.: for a flow entering a bore of a uniform magnet, if it is desired to obtain an accurate representation of B0 in the flow domain, the boundary conditions on j could be approximated as follows. (G1 , G2 , G3 represent flow, wall and external media respectively)

V B

j=0j=1

j=0

j=1

G1

G2

G3

Note: Given an analytical expression for B0, it is in general rather difficult to project out the div and curl free components simultaneously.

Structured and unstructured discretization

Structured grid showing domain decomposition forparallel flow computation

Unstructured mesh in an identical geometry using tetrahedra

Tokamak-like geometries

Solid model,domain definition

Sample unstructured mesh

Single phase flow past an obstacle in a channel

Streamlines showing separationnear the inflow-bend and the formation

of the saddle-points near a cylinder

2-D Channel flow Test case

Inflow: parabolic u-profile2 cm

20 cm

Bz0

0.35 Tesla

Channel flowWith parabolic inflow,Umax = 0.1 m/sρ = 500 kg/m3ν = 10^-6 m2/sσ= 10^6 mho/m

3-D channel flow test case

- 4

4

x- 1

1

z

- 1 1y

By

0

1

Case based on Sterl (JFM, 1990)

By = 1/(1 + exp(-x/x0))Exit flow properties arecompared with fully developedflow results based on the B-formulation

Sample calculation at Ha = 1000

Solution exhibits unsteady features, recirculation and an oscillating core flow

There is potential for numerical errors in the j formulation.

Perhaps a “Hybrid Formulation?”

Convergence acceleration techniques

Solution to Poisson equation is iterative. (esp. Neumann BCs) A fast solver will make tremendous difference.e.g.: Conjugate Gradient technique,

Residual cutting technique,

Alternatives to wall computations: approximate or semi-analytical BCse.g., impedance BC, Hartmann layer velocity profile Green’s function type solvers for steady state cases

Also, a Newton-Krylov technique for overall flow solver will help.e.g., as in TELURIDE

The induced magnetic field formulation

x

y

-4 -2 0 2 4-1

-0.5

0

0.5

1

0.14005 0.42015 0.70025 0.98035 1.26045 1.54055 1.82065 2.10075

x

y

-4 -2 0 2 4-1

-0.5

0

0.5

1

0.14005 0.42015 0.70025 0.98035 1.26045 1.54055 1.82065 2.10075

x

y

-4 -3 -2 -1 0 1 2 3 4

-1

0

1

0 0.22473 0.449459 0.674189 0.898919 1.12365 1.34838 1.57311 1.79784 2.02257

x

y

-4 -3 -2 -1 0 1 2 3 4

-1

0

1

0 0.22473 0.449459 0.674189 0.898919 1.12365 1.34838 1.57311 1.79784 2.02257

Validation cases involving induced magnetic field distributions are beingstudied. Effect of conducting walls and the computation of fields insidethe wall regions is included. Results are currently being validated.(above, Sterl’s problem for thin and thick conducting walls)

top related