Toy hierarchical problem

Numerical methods and mathematical models of Elmer
kevinarden
Posts: 2319
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Toy hierarchical problem

Post 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.
sspickle
Posts: 12
Joined: 10 Apr 2024, 14:01
Antispam: Yes

Re: Toy hierarchical problem

Post 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.
Attachments
toy3.zip
(2.99 KiB) Downloaded 5 times
kevinarden
Posts: 2319
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Toy hierarchical problem

Post 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 6 times
sspickle
Posts: 12
Joined: 10 Apr 2024, 14:01
Antispam: Yes

Re: Toy hierarchical problem

Post 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 89 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
kevinarden
Posts: 2319
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Toy hierarchical problem

Post 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
kevinarden
Posts: 2319
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Toy hierarchical problem

Post 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
kevinarden
Posts: 2319
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Toy hierarchical problem

Post 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 85 times
sspickle
Posts: 12
Joined: 10 Apr 2024, 14:01
Antispam: Yes

Re: Toy hierarchical problem

Post 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 77 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.
sspickle
Posts: 12
Joined: 10 Apr 2024, 14:01
Antispam: Yes

Re: Toy hierarchical problem

Post by sspickle »

Ah, maybe the AV solver is using the potential to infer the current and the using that to produce the magnetic field?
kevinarden
Posts: 2319
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Toy hierarchical problem

Post 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)
Post Reply