Elmer converge with non linear permeability but results are not conform

Numerical methods and mathematical models of Elmer
Post Reply
Cedric54
Posts: 17
Joined: 13 Jan 2020, 15:14
Antispam: Yes

Elmer converge with non linear permeability but results are not conform

Post by Cedric54 »

Hello,

I come back from my first post (closed coil with core simulation) with the same project.

I succeed to define circulation current in a closed coil and also to calculate force.

My problem is the following:

- When I simulate with linear permeability for the core, the simulation converge and results seems to be conform
- When I add BH curve to simulate real case, the simulation converge but results are not conform, the field seems to avoid the core as it didn't exist see picture...

I've tried a lot of thinks, change solvers (Bigstabl, CG, GMRES), Elmer always converge quickly (same duration than in linear case, it is not normal as Jacobian must be calculated and it takes time!) but never gives correct results, it seems like it ignores BH curve...
I configure all the solvers to calculate newton iteration from the first iteration.

My project is here:

https://www.transfernow.net/LyLpHl042020

Thanks for your help,

Regards
Cédric.
Attachments
Result_with_non_linear_permeability_BH_curve.jpg
Result_with_non_linear_permeability_BH_curve.jpg (74.27 KiB) Viewed 2664 times
Result_with_linear_permeability_1000.jpg
Result_with_linear_permeability_1000.jpg (38.05 KiB) Viewed 2664 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Elmer converge with non linear permeability but results are not conform

Post by kevinarden »

I changed the convergence parameters and it converges on the linear, but the non-linear immediately produces a NaN

Linear System Max Iterations = 2500
Linear System Convergence Tolerance = 1.0e-7


620 0.1099E-06
630 0.1033E-06
632 0.9920E-07
ComputeChange: NS (ITER=1) (NRM,RELC): ( Infinity NaN ) :: mgdyn
MGDynAssembly: Elapsed REAL time: 4.2351 (s)
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
1 NaN

A vtu file is created but it is not a converged solution.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Elmer converge with non linear permeability but results are not conform

Post by raback »

Hi

Made some minor changes. The ones in the linear/nonlinear system have the effect.

It is difficult to me to work with sif where the solvers are numbered in order other than the execution order. However, that probably does not have an effect.

Didn't look at the results but this does converge.

-Peter
Attachments
case.sif
updated sif file
(5.39 KiB) Downloaded 231 times
Cedric54
Posts: 17
Joined: 13 Jan 2020, 15:14
Antispam: Yes

Re: Elmer converge with non linear permeability but results are not conform

Post by Cedric54 »

Hello Peter, Kevin,

Sorry for the solvers not numbered in the order of execution....

I think I've understood the problem. It's come from the parser that read the sentence for the BH curve.

When I enter the following sentence in the BH curve:

Variable coupled iter;real Monotone Include HB2.txt; End

-> Elmer converge but gives bad values

Then when I press enter to launch an edit window where the multiline values can be edited:

Variable coupled iter
real Monotone Include HB2.txt
End

-> Elmer converge but gives bad values

But, when I press in multiline mode enter after "monotone" to have:

Variable coupled iter
real Monotone
Include HB2.txt
End

Then Elmer converge and gives good results!

I summarize this in the joined picture.

For amateur as me, it's very complicated, maybe this should be improved ?

I hope this post will help users to write correct BH curves...

Thanks.

Cédric.
Attachments
None correct and correct writing of BH curve.jpg
(83.48 KiB) Not downloaded yet
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Elmer converge with non linear permeability but results are not conform

Post by raback »

Hi

Thanx for figuring this out! Yes, the parser is the too bright. It assumes that "include" statements are in their own row. Now it failed to read it in. I added some sanity tests and will push them soon.

-Peter
Post Reply