Page 2 of 3

Re: Toy hierarchical problem

Posted: 16 Apr 2024, 12:13
by kevinarden
Regarding your plot along a line. The results data are only at the nodes, so when you do a line through the model the data is close to some nodes but farther away from others. This would impact the plot. Finer mesh would help. You can also build the mesh such that there is a line of nodes along where you want the data to exist. You could cut the model in half and coherence the two sides, then you would have a line of nodes along the center line.

Re: Toy hierarchical problem

Posted: 16 Apr 2024, 14:19
by sspickle
The getting started document was very helpful. Thank you for pointing that out!

I did add the fragment and coherence statements to the GMSH script. However, it's still diverging on the WhitneyAVSolver.

Code: Select all

BiCGStabl:      188 0.4524E+21 0.4524E+21
ERROR:: IterSolve: Numerical Error: System diverged over maximum tolerance.
STOP 1
Here are my latest input files. Suggestions most welcome! Thank you.

Re: Toy hierarchical problem

Posted: 17 Apr 2024, 14:29
by kevinarden
I was able to work through a 2D case, I will try and extend it to a 3d case.
2dcase.zip
(616.7 KiB) Downloaded 32 times

Re: Toy hierarchical problem

Posted: 18 Apr 2024, 11:23
by sspickle
Thank you!

I'm not sure how to interpret the 2D case. Maybe I'm running the solver incorrectly? This is what I see for potential.
potential.png
potential.png (34.84 KiB) Viewed 323 times
I was expecting one end of the trace to be at a higher potential, and the other end lower. I just added an

ELMERSOLVER_STARTINFO

file and ran ElmerSolver. Is that correct?

Thank you!
-steve

Re: Toy hierarchical problem

Posted: 18 Apr 2024, 11:52
by kevinarden
That is a correct way to run it.
You can also use
ElmersSolver case.sif

The potential would depend on the boundary conditions, not sure I have them, may also be the problem in 3D

Re: Toy hierarchical problem

Posted: 18 Apr 2024, 12:12
by kevinarden
I can specify the potential at each end and let Elmer calculate the current density
Boundary Condition 1
Target Boundaries(1) = 1
Name = "BoundaryCondition 1"
Infinity BC = True
Potential = 0
End

Boundary Condition 2
Target Boundaries(1) = 2
Name = "BoundaryCondition 2"
Potential = 25
End

Boundary Condition 3
Target Boundaries(1) = 3
Name = "BoundaryCondition 3"
Potential = -100
End
potential.png
(137.08 KiB) Not downloaded yet

Re: Toy hierarchical problem

Posted: 18 Apr 2024, 14:03
by kevinarden
https://github.com/mrkearden/toy

Here is a working 2D and 3D case, however I do not know if they are correct solutions.
I feel like the body force should be set to the current calculated from solver 1.
3dmag.png
3dmag.png (64.08 KiB) Viewed 319 times

Re: Toy hierarchical problem

Posted: 18 Apr 2024, 20:45
by sspickle
magfield.png
(404.67 KiB) Not downloaded yet
Excellent!

I changed:

Code: Select all


Body Force 1
  Name = "Body forces for copper"
  Electric Potential = Equals "Potential"
End

And I think that's closer. I don't understand why there are two current densities:
current-density.png
current-density.png (200.64 KiB) Viewed 311 times
However, the magnetic field is doing the right thing!
magfield.png
(404.67 KiB) Not downloaded yet
Thank you. This is a huge help. Now I'll try to sort out the magnitudes.

Re: Toy hierarchical problem

Posted: 18 Apr 2024, 20:47
by sspickle
Ah, maybe the AV solver is using the potential to infer the current and the using that to produce the magnetic field?

Re: Toy hierarchical problem

Posted: 18 Apr 2024, 21:08
by kevinarden
Regarding the 2 current densities one is data at the nodes
and the other is data at the element centroids (the one that ends in e)