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

Time dependent Maxwell equations

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2010, 11:29
Default Time dependent Maxwell equations
  #1
New Member
 
Liberis
Join Date: Sep 2010
Posts: 9
Rep Power: 16
libe is on a distinguished road
Hello guys,
could someone give me a basic guidance on implementing in OpenFoam the system of time dependent Maxwell equations (e.g Microwave modeling,scattering etc ) . The system consists of time dependent electric field and magnetic field components. The mhdFoam solver I think is not able to perform such task.

Please help!
libe is offline   Reply With Quote

Old   September 21, 2010, 09:18
Default
  #2
New Member
 
Liberis
Join Date: Sep 2010
Posts: 9
Rep Power: 16
libe is on a distinguished road
Hello again,
trying to solve the coupled system of Maxwell equation, for electric E and magnetic field H, i implemented the following solver, myMicro.C. My computational area is a cube ( 0.1m x 0.1m x 0.1m). On the left side of the cube (say inlet) I set a boundary condition oscillatingFixedValue for E and H in Oy and Oz direction respectively in order to take a wave propagation in Ox. The time step is very low 1e-13. After few iterations of the solver the wave stagnates, increases its value and the results are non physical at all...
Any ideaaa!!!


while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;

// #include "readPISOControls.H"
// #include "CourantNo.H"

tmp<fvVectorMatrix> EEqn
(
epsilon0*fvm::ddt(E)==fvc::curl(H)

);
// EEqn().relax();
EEqn().solve();


tmp<fvVectorMatrix> HEqn
(
mu*fvm::ddt(H)== -fvc::curl(E)


);
// HEqn().relax();
HEqn().solve();
libe is offline   Reply With Quote

Old   September 23, 2010, 18:12
Default
  #3
New Member
 
Corinna
Join Date: Sep 2010
Posts: 3
Rep Power: 16
Conny_T is on a distinguished road
Quote:
After few iterations of the solver the wave stagnates, increases its value and the results are non physical at all...
Any ideaaa!!!
First of all, this is the expected behaviour. If you just translate some differential operators into the fvm::... and fvc:... function calls, you are very likely to have a stability problem. Most solvers require some sort of stabilisation.
If your approach were successful, you should have been very suspicious about the result.

Quote:
epsilon0*fvm::ddt(E)==fvc::curl(H)
This is the second problem. This system of equation couples for example the Ex component to the Hy and Hz components. Unfortunately Openfoam is not yet capable of solving this system with block matrices, but instead solves them component after component. If the Maxwell equation could be solved with Openfoam, a Maxwell solver would already be shipped with it.

Conny
Conny_T is offline   Reply With Quote

Old   September 24, 2010, 03:55
Default
  #4
New Member
 
Liberis
Join Date: Sep 2010
Posts: 9
Rep Power: 16
libe is on a distinguished road
Thanks conny,
I ve already realized that something important is missing from my approach with OpenFoam. Now I try to do my work with the classical FDTD adopting some AMR approaches. But I was wondering if openfoam could solve the Maxwell equation with the suggestion of Shankar, Hall et all for an Finite Volume Ttime domain CFD like solution.
libe is offline   Reply With Quote

Old   October 1, 2010, 11:43
Default
  #5
Senior Member
 
Mirko Vukovic
Join Date: Mar 2009
Posts: 159
Rep Power: 17
mirko is on a distinguished road
Quote:
Originally Posted by Conny_T View Post
First of all, this is the expected behaviour. If you just translate some differential operators into the fvm::... and fvc:... function calls, you are very likely to have a stability problem. Most solvers require some sort of stabilisation.
If your approach were successful, you should have been very suspicious about the result.

This is the second problem. This system of equation couples for example the Ex component to the Hy and Hz components. Unfortunately Openfoam is not yet capable of solving this system with block matrices, but instead solves them component after component. If the Maxwell equation could be solved with Openfoam, a Maxwell solver would already be shipped with it.

Conny
I am trying to understand this issue better. The `standard' FDTD (finite difference time domain) solution for Maxwell equations uses a leapfrog scheme: it first solves for all dE/dt (and updates E) from the curl of H for one half the time step, and then solves for dH/dt (and updates H) from curl of E and J for the other half the time step

Taking one step & one component as an example, in cartesian coordinates, dE_x/dt will depend on (curl H)_x, all of which are known. Integrating this over a volume, this can be viewed that the (curl H)_x is the source term for E_x in that cell.

I did not write the formulas in detail, but I don't see here a matrix solution problem here. Only evaluation of the source term (curl H), and updating the LHS (E).

I consider myself an OF and numerical arts novice, but I wonder if the OP used a time step that is too large, or if he set up the initial conditions correctly.

Mirko
mirko is offline   Reply With Quote

Old   September 21, 2015, 13:47
Default Did you get a Solution???
  #6
New Member
 
Víctor Mendoza García
Join Date: Nov 2012
Posts: 2
Rep Power: 0
vitoco is on a distinguished road
Quote:
Originally Posted by Conny_T View Post
This is the second problem. This system of equation couples for example the Ex component to the Hy and Hz components. Unfortunately Openfoam is not yet capable of solving this system with block matrices, but instead solves them component after component.
Conny
Hello Conny:
Can you show me an example (link, code, pdf, etc...) to understand how to apply "solves them component after component" ???? Thanks in advance, I need it in this moment to simulate a electromagnetic wave for my thesis.
Best regards,


Victor
vitoco 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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
time dependent inlet subroutine. HELP!!! jimmer Siemens 4 November 10, 2008 09:49
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 13:32


All times are GMT -4. The time now is 21:46.