Hello everyone,
With regards to the 'wire' test case sitting at https://github.com/ElmerCSC/elmerfem/tr ... monic_wire, can someone please advise on how to get Elmer to compute the following values:
* the total current across the wire
* the resistance of the wire
* the inductance of the wire
Elmer does return the correct ' Eddy current power' as well as the correct 'ElectroMagnetic Field Energy'. From these values, I can manually work out the total current as well as the real (resistance) and imaginary (inductance) parts of the total impedance.
However, it would be so nice to have Elmer compute these values automatically (i.e total current across the wire, resistance of the wire, and inductance of the wire).
If the calculation of the resistance and the inductance are not possible, having the total current in its imaginary form would be great.
Browsing through the forum it looks like it is not the first time this question about total current calculation is asked, but I have not found a clear answer to this problem yet.
Your help would be much appreciated.
thanks
Laurent
Whitney solver  Wire test case total current calculation

 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,
There are plenty of things that could be computed inside the solvers. The list is quite long and as Elmer is a multiphysics code there has often not been much effort to do this for each application area.
Also, for a wire it is easy. But generally you cannot define a single resistance or impedance. The energy is natural since it is the full volume integral. These require that you have just single input/output port. What kind of logic would you suggest if we were to add some lumping features?
Probably you have read about SaveScalars and some integral operators for obtaining these. I agree that it is rather cumbersome.
Peter
There are plenty of things that could be computed inside the solvers. The list is quite long and as Elmer is a multiphysics code there has often not been much effort to do this for each application area.
Also, for a wire it is easy. But generally you cannot define a single resistance or impedance. The energy is natural since it is the full volume integral. These require that you have just single input/output port. What kind of logic would you suggest if we were to add some lumping features?
Probably you have read about SaveScalars and some integral operators for obtaining these. I agree that it is rather cumbersome.
Peter
Re: Whitney solver  Wire test case total current calculation
Hi Peter,
One way of tackling this would be to run the surface integral of the current densities over the model boundary.
I tried SaveScalars by adding a solver to the .sif file
Solver 5
Equation = "SaveScalars"
Exec Solver = After All
Procedure = "SaveData" "SaveScalars"
Filename = b.dat
Variable 1 = current density re e3
Operator 1 = boundary int
Variable 2 = current density im e3
Operator 2 = boundary int
End
and I also added the following line in the 'wire start' boundary condition (I also tried at the 'wire end')
Save Scalars = True
I was expecting to get the Zcomponent of the current (both REAL and IMAGINARY parts) written to the file b.dat...
but I endup having the following outputs:
1: res: eddy current power
2: res: electromagnetic field energy
I agree that asking for a simple resistance or inductance is a bit over the top and would apply mainly for wire or coil type cases.
However, being able to calculate the total current flowing through a surface is key... and this is what I am desperate to do with the Whitney solver.
Could you please help and guide me through a method for calculating the total current that flows through a defined surface?
Laurent
One way of tackling this would be to run the surface integral of the current densities over the model boundary.
I tried SaveScalars by adding a solver to the .sif file
Solver 5
Equation = "SaveScalars"
Exec Solver = After All
Procedure = "SaveData" "SaveScalars"
Filename = b.dat
Variable 1 = current density re e3
Operator 1 = boundary int
Variable 2 = current density im e3
Operator 2 = boundary int
End
and I also added the following line in the 'wire start' boundary condition (I also tried at the 'wire end')
Save Scalars = True
I was expecting to get the Zcomponent of the current (both REAL and IMAGINARY parts) written to the file b.dat...
but I endup having the following outputs:
1: res: eddy current power
2: res: electromagnetic field energy
I agree that asking for a simple resistance or inductance is a bit over the top and would apply mainly for wire or coil type cases.
However, being able to calculate the total current flowing through a surface is key... and this is what I am desperate to do with the Whitney solver.
Could you please help and guide me through a method for calculating the total current that flows through a defined surface?
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
Maybe you can try
It is like velocity vector going through surface.
Peter
Maybe you can try
Code: Select all
Variable 1 = current density re e
Operator 1 = convective flux
Peter
Re: Whitney solver  Wire test case total current calculation
Thanks for your prompt reply Peter
I tried your suggestion and the solver returns an error:
ERROR:: SaveScalars: For convective flux of a scalar we need the convective field!
I tried your suggestion and the solver returns an error:
ERROR:: SaveScalars: For convective flux of a scalar we need the convective field!

 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,
Ok, there was some glitch in the code. The code had some trouble in getting DG values for boundaries (the boundary elements themselves do not have DG indexes). I made some fixes to the code + added your suggested format to the consistency test.
Changes are in devel and maybe the were in time for nightly build.
Peter
Ok, there was some glitch in the code. The code had some trouble in getting DG values for boundaries (the boundary elements themselves do not have DG indexes). I made some fixes to the code + added your suggested format to the consistency test.
Changes are in devel and maybe the were in time for nightly build.
Peter
Re: Whitney solver  Wire test case total current calculation
okay thanks
let me know when the new version will be available and I'll give it a try.
Laurent
let me know when the new version will be available and I'll give it a try.
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
Where do you get your binary? Or what platform do you use?
Re: Whitney solver  Wire test case total current calculation
I work on Windows10

 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,
The binaries appear every night here:
https://www.nic.funet.fi/pub/sci/physic ... s/?C=M;O=D
Perhaps I just missed this build but it should be updated again in ~7 hours or so.
Peter
The binaries appear every night here:
https://www.nic.funet.fi/pub/sci/physic ... s/?C=M;O=D
Perhaps I just missed this build but it should be updated again in ~7 hours or so.
Peter