Input problem

31 views
Skip to first unread message

Hector Lestani

unread,
May 5, 2018, 9:35:53 AM5/5/18
to was...@seamplex.com
Hello all,
I am working on a simple academic example, a reflected sphere.
When running, the following error appears:
"error: NaN found when computing leakage term for group 1 at cell 11516
(element 25626) vector chi has size 0 and problem has 1 groups"
You can find attached the ".was" and the "geo.m4" needed inputs. You may
run the example with "milonga UnOctavoDeEsferaReflejada.was", the ".msh"
is generated on the fly (as usual with milonga).
I am running milonga version v0.5.8-g1e319fc+Δ
However I am afraid that the error message is due to an input problem,
but I couldn't find it on my own.
What would be the procedure to detect such a geometric problem?

One clue:
when preparing the input, the "line loops" where only accepted by gmsh
when the lines were defined with a certain points order. That is why you
will find two names describing the same line but running in the opposite
direction (for example, lines 12 and 13, 10 and 15, 11 and 14).

If there is any of you not having a life (like me) and reading this on a
saturday morning, I will really appreciate any help (I think this is
quite a simple question in comparison with the usual high-level
discussions here ;)
Otherwise, I'll wait till monday.

Thanks.
UnOctavoDeEsferaReflejada.was
UnOctavoDeEsferaReflejada.geo.m4

Ramiro Vignolo

unread,
May 5, 2018, 10:53:29 AM5/5/18
to was...@seamplex.com
Hi

actually, milonga is printing two separate errors.

the first one is really simple, there was a bug in milonga’s init.c file. Since I do not have write access to milonga repo, please update your file with the following or wait for jeremy to update the repo:

// por default, el espectro de fision es 100% en el grupo rapido
if ((milonga.vectors.chi = wasora_get_vector_ptr("chi")) == NULL) {
milonga.vectors.chi = wasora_define_vector("chi", milonga.groups, NULL, NULL);
wasora_call(wasora_vector_init(milonga.vectors.chi));
gsl_vector_set(wasora_value_ptr(milonga.vectors.chi), 0, 1);
} else {
wasora_call(wasora_vector_init(milonga.vectors.chi));
if (milonga.vectors.chi->size != milonga.groups) {
wasora_push_error_message("vector chi has size %d and problem has %d groups", milonga.vectors.chi->size, milonga.groups);
return WASORA_PARSER_ERROR;
}
}

the second error is "error: NaN found when computing leakage term for group 1 at cell 11516 (element 25626)”

I will check it out and see if I can help you with some insight.

thanks!

ramiro
> --
> You received this message because you are subscribed to the Google Groups "wasora" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wasora+un...@seamplex.com.
> To post to this group, send email to was...@seamplex.com.
> Visit this group at https://groups.google.com/a/seamplex.com/group/wasora/.
> To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/a1191831-272b-e8b1-b0f4-b10eb05be366%40cab.cnea.gov.ar.
> For more options, visit https://groups.google.com/a/seamplex.com/d/optout.
> <UnOctavoDeEsferaReflejada.was><UnOctavoDeEsferaReflejada.geo.m4>

jeremy theler

unread,
May 5, 2018, 11:21:59 AM5/5/18
to was...@seamplex.com
i have some comments form different nature but I am on the phone so I cannot address them all now

did you try using fem?

--
--
jeremy theler
www.seamplex.com

Hector Lestani

unread,
May 5, 2018, 11:34:10 AM5/5/18
to was...@seamplex.com
Thank you both guys.
Germán: I was using fvm. Using fem it runs but gives K=0.0000. Shouldn't be the case.

Ramiro: I am working on another example right now (for the reactor physics students), but as soon as I finish it, I will implement the modification you suggested. I'm not sure how to compile afterwards, i will have to read a little bit (I guess "make clean; make configure; make all" or something similar, but not sure now).

Thank you again guys.
I will let you know any news.

PD: I thought I should get a life.... but now I see I should try to get 3... I'll try.

Ramiro Vignolo

unread,
May 5, 2018, 12:31:45 PM5/5/18
to was...@seamplex.com
Chaco, just modify the ‘input.c' file that you may find in ‘src’ folder. Then, run ‘make’ and that will be enough.

A quick recommendation is to use M4 wasora keyword instead of the SHELL + sed instructions since you have a template file, i.e. replace the SHELL+sed instructions in your input with:

M4 INPUT_FILE_PATH UnOctavoDeEsferaReflejada.geo.m4 OUTPUT_FILE_PATH UnOctavoDeEsferaReflejada.geo {
  MACRO LongitudCaracteristica $1
  MACRO RadioEsfera $2
  MACRO RadioReflector $3
}

I believe the remaining error is within the geo definition and later, with the mesh. Have you checked out all the warnings gmsh is throwing?

thank you!

Hector Lestani

unread,
May 5, 2018, 1:05:36 PM5/5/18
to was...@seamplex.com
Ramiro,
the compilation worked perfectly and the "chi" error disappeared.
Ok, I'll use the M4 way of changing the geo file.

The warnings that gmsh thows when generating the .msh file have no clear meaning for me...

I'll keep studying...

Thanks!

jeremy theler

unread,
May 5, 2018, 1:12:33 PM5/5/18
to was...@seamplex.com
Ramiro you now have write permissions on the milonga repo, fix whatever bug you think should be fixed

BTW, any problem with chi in 1-group provlems can be fixed by not defining it. In 1 group there can br only one fission spectrum, that is chi(1) = 1
It only makes sense to define chi only if neutrons are born in other group besides the fast group

Hector, I knew you were using fvm because that nan error is from fvm only :-)
The fact that fem gives k=0 seems that there is a problem with the mesh

Did you try the "Sphere" command in Gmsh? See the docs here http://gmsh.info/doc/texinfo/gmsh.html#Volumes
you need gmsh 3 for it to work

to "debug" problems with the mesh, open the .msh in the gmsh gui and go to tools -> visibility and you can manually give the ids of the elements or nodes that should be shown (or hidden)
maybe you can see what the problematic element looks like
keep in mind that different versions of gmsh will give different actual meshes so the reported element ids only work for your mesh which for sure will be different from ours even using the same geo

finally, one of my comments was about using the actual M4 keyword as pointed out by Ramiro and not calling sed from SHELL

the other one was that Mesh.CharacteristicLengthFromCurvature is a flag that can be either 0 or 1, not 0.05

jeremy theler

unread,
May 5, 2018, 1:25:13 PM5/5/18
to was...@seamplex.com
about the issue with the "line loops" in gmsh, it is a complex approach to a create a reflected sphere (it was the only way before adding the opencascade factory and the sphere command in gmsh v3)

now, what might be happening (I am still over the phone) is that somehow the interface between the two spheres is duplicated or degenerated or something like that

try adding the Coherence; command before setting the physical entities (again you might need to swith to the opencascade kernel before defining the points in the geo file, see gmsh doc)

jeremy theler

unread,
May 5, 2018, 2:30:14 PM5/5/18
to was...@seamplex.com
Dear Hector

Find attach my proposal.
I think that SigmaS is not used in diffussion if SigmaA is given. And it is not that funny to have only one group in reflected problems!


eighth-sphere.geo.m4
eighth-sphere.mil

Hector Lestani

unread,
May 5, 2018, 2:47:13 PM5/5/18
to was...@seamplex.com
Thanks Germán,
considering the great simplicity of your input proposal, I'm downloading gmsh 3.0.6 right now...

Regarding the energy discretization... in one group you can not see the spectral softening produced by a light reflector, but the goal here is to solve a problem that the students can analytically solve by hand... they have already used milonga for 2 and 3 groups structure.
Thank you for noticing that any way.

I'll see how this works...

jeremy theler

unread,
May 5, 2018, 3:05:59 PM5/5/18
to was...@seamplex.com
you should always stay updated! keep milonga, wasora and gmsh up to date

tell us if you see anything strange

compare diffusion and sn, fem and fvm, etc

Hector Lestani

unread,
May 5, 2018, 3:28:39 PM5/5/18
to was...@seamplex.com
Yes, but in this case update would not suffice.
gmsh 3.0.6 is not available at ubuntu's repository, yet, so I downloaded it from gmsh's page.
It seems to be working fine, but I need more time for other tests...

Thanks and have a nice week(end?)!!!!!
Reply all
Reply to author
Forward
0 new messages