VectorHelmholtz: Missing i*omega infront of Current Density

Clearly defined bug reports and their fixes
Post Reply
intex
Posts: 1
Joined: 29 Jan 2018, 15:48
Antispam: Yes

VectorHelmholtz: Missing i*omega infront of Current Density

Post by intex » 29 Jan 2018, 18:49

Dear all,

I am still quite new to Elmer and wondering if this is actually a bug or just because I have overseen the factor by myself. If it is not a bug, I am of course happy to learn where my mistake is. :x

According to Elmer Modules manual, the VectorHelmholtz module should solve the time harmonic Maxwell equations, which are basically (17.3):
rot mu^-1 rot E - omega^2 eps E = i omega J
Is it possible that the prefactor infront of the current density "i omega" has been fogotten in the VectorHelmholtz implementation?

If you assume a spatially constant current density over an infinite large room then it induces an electric field
E = - i / ( omega eps ) J
If you set, for example, J = 1 A/m^2 and insert eps, you would expect for a frequency of 10 GHz an induced field of ~ -i 1.8 V/m. In all my simulations I however get an induced field of ~ -2.9e-11 V/m, which is off by 11 orders of magnitude, to be precise by a factor of i * 2 * pi * 10GHz.
Furthermore the induced field seems to have the wrong phase. Despite it beeing phase shifted by -Pi/2 due to the "-i" factor, it is phase shifted by Pi in my simulation output.
Assuming that the prefactor "i omega" has been just forgotten in the VectorHelmholtz implementation, all phases and field magnitudes come out correctly.

I have actually also checked VectorHelmholtz.F90 and not found a factor of i*omega infront of the current density, though I might have overseen it. I am actually a bit confused by this fluid dynamics formulation...

Elmer Version: 8.3
OS: Ubuntu 16.04 LTS

How to reproduce: The simplest way to reproduce this, is by running the attached .sif file, on a domain of size 0.09x0.03x0.4m³ meshed with maxh=0.003m (~ 0.1*lambda)
Of course this is not an infinite large room and J is not constant. Though, for the rot terms to become (such) important, we would expect to see wave propagation or a standing wave in the simulation output. You can see this by for example changing the sine in z-direction to a cosine. Then J has a sharp discontinuity at the simulation domain boundaries and you should see a standing wave.

Thank you,
Regards,

Intex
Attachments
case.sif
Sif File
(3.33 KiB) Downloaded 17 times

kataja
Posts: 71
Joined: 09 May 2014, 16:06
Antispam: Yes

Re: VectorHelmholtz: Missing i*omega infront of Current Density

Post by kataja » 30 Jan 2018, 18:11

Hello,

that is in fact correct. Thanks. The i*omega factor is indeed missing from the current density so the bug is either in the documentation or in the code. I am however, inclined to have this documented as a feature if someone is actually using this and circumventing the bug by just multiplying the current density by hand...

I created an issue about this https://github.com/ElmerCSC/elmerfem/issues/134.

Cheers,
Juhani

Post Reply