Many thanks Peter,
some good progress here as Elmer now exports the total current
1: boundary int: current density re 3 over bc 3
2: boundary int: current density im 3 over bc 3
3: res: eddy current power
4: res: electromagnetic field energy
I got this result with the following commands
Variable 1 = current density re 3
Operator 1 = boundary int
Variable 2 = current density im 3
Operator 2 = boundary int
the values reported for 2:, 3: and 4: are spot on
however, there is a big discrepancy on 1: which is the real part of the total current... I need to investigate a bit more, make sure the problem is not at my end.
Thanks for the effective support, I will get back to you with some more results soon
Whitney solver  Wire test case total current calculation
Re: Whitney solver  Wire test case total current calculation
Hi Peter,
I confirm the values returned by SaveScalars for the total current have some errors
The true values for the total current are: Re=0.16 and Im=2.95 whereas Elmer returns Re=0.0465 and Im=2.86
note: potential applied to the wire is 0.01V at a frequency of 160kHz
the Imaginary part of the total current is close, but the real part of the current returned by Elmer is wrong.
I know Re=0.16 and Im=2.95 are correct as they agree with the analytical calculation;
Also, the total current calculated from Paraview matches perfectly with the analytical calculations too (method used in Paraview: integration of the current densities over the section of the wire). This implicitly proves that Elmer returns the right current densities to Paraview and therefore the problem is somehow within SaveScalars...
any thoughts?
Laurent
I confirm the values returned by SaveScalars for the total current have some errors
The true values for the total current are: Re=0.16 and Im=2.95 whereas Elmer returns Re=0.0465 and Im=2.86
note: potential applied to the wire is 0.01V at a frequency of 160kHz
the Imaginary part of the total current is close, but the real part of the current returned by Elmer is wrong.
I know Re=0.16 and Im=2.95 are correct as they agree with the analytical calculation;
Also, the total current calculated from Paraview matches perfectly with the analytical calculations too (method used in Paraview: integration of the current densities over the section of the wire). This implicitly proves that Elmer returns the right current densities to Paraview and therefore the problem is somehow within SaveScalars...
any thoughts?
Laurent

 Site Admin
 Posts: 4173
 Joined: 22 Aug 2009, 11:57
 Antispam: Yes
 Location: Espoo, Finland
 Contact:
Re: Whitney solver  Wire test case total current calculation
Hi Laurent
This is what I got after changing the V & f:
I used the elemental field with "e" (discontinous galerkin basis). The standard nodal fields smooth the discontinuities and make the results of the integral less accurate.
Peter
This is what I got after changing the V & f:
Code: Select all
2.952119423550E+000 1.588912894031E001
Peter
Re: Whitney solver  Wire test case total current calculation
Hi Peter,
fab! that is really good news.
Can you please share your .sif file as I'm still struggling and failed to get to your results.
look forward to seeing your .sif file.
Thanks
Laurent
fab! that is really good news.
Can you please share your .sif file as I'm still struggling and failed to get to your results.
look forward to seeing your .sif file.
Thanks
Laurent
Re: Whitney solver  Wire test case total current calculation
PROBLEM RESOLVED:
Hi Peter,
I uploaded the latest build of Elmer and my .sif file now returns the correct values for the total current!
Many thanks for your help! really appreciated.
Here is a brief summary of the solution so that the Elmer community can beneficiate from this experience
Solver 2
Equation = "MGDynamicsCalc"
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
.....
! make sure the Elemental fields are calculated
Calculate Elemental Fields = Logical True
End
Solver 5
Equation = "SaveScalars"
Exec Solver = After All
Procedure = "SaveData" "SaveScalars"
Filename = Integrals.dat
! integrate the z component of the current density over the specified boundary
Variable 1 = current density re e 3
Operator 1 = boundary int
Variable 2 = current density im e 3
Operator 2 = boundary int
End
! save scalars (i.e surface integral on this boundary <=> total current) calculated on the 'wire end' boundary)
Boundary Condition 3
Name = "WireEnd"
Target Boundaries(1) = 3
! calculate the total current on this specific boundary
Save Scalars = True
Coil End = Logical True
AV re {e} 1 = Real 0.0
AV re {e} 2 = Real 0.0
AV re = Real 0.01
AV im {e} 1 = Real 0.0
AV im {e} 2 = Real 0.0
AV im = Real 0.0
End
Elmer will compute the total current through the 'wire end' boundary and will save the Real and Imaginary parts in a text file called Integrals.dat
using the wire test case geometry, a voltage differential of 0.01V at a frequency of 160kHz will return for the total current Re= 1.608873670102E001 and Im= 2.968420465030E+000 . These values are correct.
Hi Peter,
I uploaded the latest build of Elmer and my .sif file now returns the correct values for the total current!
Many thanks for your help! really appreciated.
Here is a brief summary of the solution so that the Elmer community can beneficiate from this experience
Solver 2
Equation = "MGDynamicsCalc"
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
.....
! make sure the Elemental fields are calculated
Calculate Elemental Fields = Logical True
End
Solver 5
Equation = "SaveScalars"
Exec Solver = After All
Procedure = "SaveData" "SaveScalars"
Filename = Integrals.dat
! integrate the z component of the current density over the specified boundary
Variable 1 = current density re e 3
Operator 1 = boundary int
Variable 2 = current density im e 3
Operator 2 = boundary int
End
! save scalars (i.e surface integral on this boundary <=> total current) calculated on the 'wire end' boundary)
Boundary Condition 3
Name = "WireEnd"
Target Boundaries(1) = 3
! calculate the total current on this specific boundary
Save Scalars = True
Coil End = Logical True
AV re {e} 1 = Real 0.0
AV re {e} 2 = Real 0.0
AV re = Real 0.01
AV im {e} 1 = Real 0.0
AV im {e} 2 = Real 0.0
AV im = Real 0.0
End
Elmer will compute the total current through the 'wire end' boundary and will save the Real and Imaginary parts in a text file called Integrals.dat
using the wire test case geometry, a voltage differential of 0.01V at a frequency of 160kHz will return for the total current Re= 1.608873670102E001 and Im= 2.968420465030E+000 . These values are correct.