Dear all,
I'm currently trying to simulate the transient magnetic field and current density of a cylindrical waveguide and noticed something strange. I applied a sinusoidal potential (50 Hz) on the first boundary and ground to the second boundary. Then I used SaveScalar to calculate the current at the boundary. The current is as expected a sinus. Now in Paraview I would expect the magnetic field to rotate once to the left and once to the right, depending on whether the sinus is a positive or negative. But this is not the case. The magnetic field is almost zero during the negative half wave and always rotates to one direction. The current density and the potential (av) are changing as excpected their directions / signs in Paraview. What am I doing wrong?
The mesh was created with Salome. I added the case and the screenshots.
Thanks in advance for the help.
Josef
Strange problem with MgDyn-Solver
Strange problem with MgDyn-Solver
- Attachments
-
- HField_10ms.png
- (692.64 KiB) Not downloaded yet
-
- case.sif
- (5.44 KiB) Downloaded 30 times
-
- HField_20ms.png
- (180.48 KiB) Not downloaded yet
-
- Posts: 2402
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Strange problem with MgDyn-Solver
Looks OK to me. The magnitude of the magnetic field in Paraview appears to be always a postive number, but the components x, y, z oscillate. I used your sif, but I had to build the mesh.
Re: Strange problem with MgDyn-Solver
Hi,
I added the Salome-File and removed the mesh. I did a transient simulation with a DC-voltage on its input (2.8923e-04 V) and received approx. 26 A, which matches the theory. But when I add a sinus-function, the H-field-vector is not only in the wrong direction, the magnitude is also nearly 0 A.
One interesting thing this, if I change the waveguide to a normal conductor (material and boundary change in the middle) then everything is correct.
Can this be a mesh problem? Although, I already tried a lot of different meshes ...
Timestep: 1ms
Input voltage: 2.8923e-04*sin(2*pi*50*t)
Waveguide geometry:
Outer radius: ra=0.167 m
Inner radius: ri=0.155 m
Length: l=7.2 m
I added the Salome-File and removed the mesh. I did a transient simulation with a DC-voltage on its input (2.8923e-04 V) and received approx. 26 A, which matches the theory. But when I add a sinus-function, the H-field-vector is not only in the wrong direction, the magnitude is also nearly 0 A.
One interesting thing this, if I change the waveguide to a normal conductor (material and boundary change in the middle) then everything is correct.
Can this be a mesh problem? Although, I already tried a lot of different meshes ...
Timestep: 1ms
Input voltage: 2.8923e-04*sin(2*pi*50*t)
Waveguide geometry:
Outer radius: ra=0.167 m
Inner radius: ri=0.155 m
Length: l=7.2 m
- Attachments
-
- HField_39ms.png
- (390.72 KiB) Not downloaded yet
-
- HField_29ms.png
- (905.4 KiB) Not downloaded yet
-
- WaveGuideMesh.hdf.zip
- (32.15 KiB) Downloaded 24 times
-
- Posts: 2402
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Strange problem with MgDyn-Solver
My mesh was very different, generally with magdyn the part is placed in a volume of air, preferably a sphere since the far field boundary is tangent to the surface.
If you look at the elmag examples they are generally done this way.
https://github.com/ElmerCSC/elmer-elmag
If you look at the elmag examples they are generally done this way.
https://github.com/ElmerCSC/elmer-elmag
Re: Strange problem with MgDyn-Solver
Thanks, I will try the sphere air volume.
I thought I would help the solver if I use a cylindric air, due to the radial magnetic field. Additionally, I added a very small mesh in the middle due to my small copper thickness (10 mm) in comparison to the big conductor diameter with 330 mm.
I thought I would help the solver if I use a cylindric air, due to the radial magnetic field. Additionally, I added a very small mesh in the middle due to my small copper thickness (10 mm) in comparison to the big conductor diameter with 330 mm.
Re: Strange problem with MgDyn-Solver
Hi again,
last night I tried a lot of things with the sphere, but the results are getting worse than before. One problem is, that I do not really manage it make a fine mesh in the copper-cylinder without getting memory troubles and all other meshing solutions e.g. extrusion 3D, netgen on 2D and 1D wire discretization lead to a bad mesh and totally wrong results.
Then I did a few quick estimations with your geometry data (ri = 50 mm, ra = 100 mm, l = 300 mm): Under these assumptions the stationary current would be approx. 1300 A @ an input voltage of 2.8923e-04 V. What I noticed, is that the magnetic field in your image is too low for the current. On the corner of the wire the H-field should be approx. I / (2 * pi * ra) = 2070 A / m.
Did you also apply the voltage and ground to the circular side or somewhere else?
Another question: How did you manage it to get rid of the air volume in Paraview? Do you use the threshold-filter on the geometry IDs? If I do this with parallel processings then my Paraview crashes. If I use single processing, then it works ...
last night I tried a lot of things with the sphere, but the results are getting worse than before. One problem is, that I do not really manage it make a fine mesh in the copper-cylinder without getting memory troubles and all other meshing solutions e.g. extrusion 3D, netgen on 2D and 1D wire discretization lead to a bad mesh and totally wrong results.
Then I did a few quick estimations with your geometry data (ri = 50 mm, ra = 100 mm, l = 300 mm): Under these assumptions the stationary current would be approx. 1300 A @ an input voltage of 2.8923e-04 V. What I noticed, is that the magnetic field in your image is too low for the current. On the corner of the wire the H-field should be approx. I / (2 * pi * ra) = 2070 A / m.
Did you also apply the voltage and ground to the circular side or somewhere else?
Another question: How did you manage it to get rid of the air volume in Paraview? Do you use the threshold-filter on the geometry IDs? If I do this with parallel processings then my Paraview crashes. If I use single processing, then it works ...
-
- Posts: 2402
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Strange problem with MgDyn-Solver
The air volume in paraview can be turned off and one by using the threshold filter, filter on geometry IDs, you can filter to only show the bodies you want to see.
In the run I posted I had put voltage on the outer skin, and ground on the inner skin. I will re-run with voltage on the end.
I tried meshing your geometry and had similar problems. The cylinder is very long and thin, making element ratios difficult.
In the run I posted I had put voltage on the outer skin, and ground on the inner skin. I will re-run with voltage on the end.
I tried meshing your geometry and had similar problems. The cylinder is very long and thin, making element ratios difficult.
-
- Posts: 2402
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Strange problem with MgDyn-Solver
With your geometry it my be best to stick with a cylinder for the air with a mesh similar to Figure 14.1 on page 91
https://www.nic.funet.fi/pub/sci/physic ... orials.pdf
https://www.nic.funet.fi/pub/sci/physic ... orials.pdf
-
- Posts: 2402
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Strange problem with MgDyn-Solver
I took a cylinder of the same size and meshed it in a sphere of air and a cylinder of air and the results were very different. Same element type and density.