|
[Sponsors] |
February 11, 2015, 11:55 |
Modifying sonicFoam to add EM terms
|
#1 |
New Member
Alexey Ryakhovskiy
Join Date: Sep 2014
Posts: 11
Rep Power: 12 |
Hello, everyone!
I'm trying to include electromagnetic force UxB (where B is constant in time) and Joule heating into sonicFoam, but I'm having troubles modifying the equations. I added B into createFields.H and terms into right hand sides of UEqn and EEqn, but it doesn't seem to work. (I have very little idea about programming with openFoam) Here are the codes of equations I modified: Code:
F = sigma*U^B^B; fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + turbulence->divDevRhoReff(U) + F ); solve(UEqn == -fvc::grad(p)); K = 0.5*magSqr(U); Code:
E = U^B; J = sigma*E; Q = J&E; { solve ( fvm::ddt(rho, e) + fvm::div(phi, e) + fvc::ddt(rho, K) + fvc::div(phi, K) + fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, "div(phiv,p)") - fvm::laplacian(turbulence->alphaEff(), e) - Q ); thermo.correct(); } Last edited by Alexee; February 12, 2015 at 12:03. |
|
Tags |
mhd, openfoam, sonicfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
rotational and inviscid | Mike | Main CFD Forum | 40 | November 9, 2023 07:03 |
Adding source terms to rhoCentralFoam | chriss85 | OpenFOAM Programming & Development | 1 | July 1, 2023 14:08 |
How to add implicit terms to the momentum equation? | MaryBau | OpenFOAM Programming & Development | 12 | July 3, 2022 06:22 |
Source terms in sonicFoam / PIMPLE | chriss85 | OpenFOAM Programming & Development | 12 | July 6, 2015 05:59 |
K-Epsilon model? | Brindaban Ghosh | Main CFD Forum | 2 | June 24, 2000 05:22 |