CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

MHD---divergence problem regarding epotFoam solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 22, 2017, 09:09
Default MHD---divergence problem regarding epotFoam solver
  #1
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Dear Foamers,

I am currently studying about the metal pad instability. There is a good solver named epotFoam created by Alessandro.

It works on a standard MHD solving procedure. Everything is good but I found one problem while doing the test to see the divergence of the electric current:

Because the MHD's elliptic equation is solved demanding to the charge conservation(divergence operation•J=0). I wrote a test phase into the eqotFoam's original code to plot the divergence of the jn.
Quote:
//Interpolating cross product u x B over mesh faces
surfaceScalarField psiub = fvc::interpolate(U ^ B0) & mesh.Sf();

//Poisson equation for electric potential
fvScalarMatrix PotEEqn
(
fvm::laplacian(PotE)
==
fvc::div(psiub)
);

//Reference potential
PotEEqn.setReference(PotERefCell, PotERefValue);

//Solving Poisson equation
PotEEqn.solve();

//Computation of current density at cell faces
surfaceScalarField jn = -(fvc::snGrad(PotE) * mesh.magSf()) + psiub;

//Current density at face center
surfaceVectorField jnv = jn * mesh.Cf();

//Interpolation of current density at cell center
volVectorField jfinal = fvc::surfaceIntegrate(jnv) - (fvc::surfaceIntegrate(jn) * mesh.C());

//Update current density distribution and boundary condition
jfinal.correctBoundaryConditions();

//Lorentz force computation
lorentz = sigma* (jfinal ^ B0);

volScalarField test3 = fvc::div(jn);

test3.write();

I tried to run this solver in huntFlow case and let it run for 2 time steps to see the divergence of ‘jn’. In principle, the result is supposed to be uniform zero around the field. But in fact, it was not.The divergence of the jn is far bigger than it is supposed to be. Therefore, there seems to somewhere wrong to me.

Could anybody please correct if my thought for the divergence test is not right? Or there is something I am missing?

Appreciate your time and effort in advance!

Best regards,
Linyan
linyanx is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Divergence detected in AMG solver siri FLUENT 8 March 12, 2018 17:08
The problem of Stiff Chemistry Solver in Multiphase model shenzhou1987 FLUENT 1 January 11, 2016 02:52
Problem with the convergence of the solver DOliveira OpenFOAM Running, Solving & CFD 3 November 9, 2015 11:25
EMMS in fluent 14.5 diverging problem jipaz Main CFD Forum 0 May 21, 2014 09:56
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34


All times are GMT -4. The time now is 02:56.