Now there are nonpositive jacobian

About the development of the FEM module/workbench.

Moderator: bernd

sirpete83
Posts: 17
Joined: Thu Jun 01, 2017 1:12 pm
Location: 45357, Essen, Germany

Now there are nonpositive jacobian

Post by sirpete83 »

Hallo,
i have a new problem.
The story behind.... some months ago I simulated a part with its eigenmodes. It worked perfect, but i do not remember the exact version of freecad.
Because of other projects I use always the newest daily build.

Now I have to simulate the old part again, no problem i thought. But it is ... there are now non positive jacobians !?! in the same file... whats going on .. spend 8 hours on it now I'm here.

gmsh wtihout errors or warnings.
cgx without bad elements
ccx nonpositive jacobians

Any ideas?

Thanks
sono1.FCStd
eigenmode problems
(669.23 KiB) Downloaded 42 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Now there are nonpositive jacobian

Post by bernd »

your file runs fine for me on ccx 2.11

screen.jpg
screen.jpg (196.73 KiB) Viewed 2379 times

But I had some problems to on simple shapes too with frequency. See https://forum.freecadweb.org/viewtopic.php?f=18&t=22673 Try a static analyais by fixing some face and applying a force or a pressure. Does it helps.

bernd
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Now there are nonpositive jacobian

Post by bernd »

There is another one you could try. Use the netgen mesher. It produces better tetra meshes than gmsh, ccx has less problems with.
sirpete83
Posts: 17
Joined: Thu Jun 01, 2017 1:12 pm
Location: 45357, Essen, Germany

Re: Now there are nonpositive jacobian

Post by sirpete83 »

Hallo bernd,

do you have changed anything on the mash, that was in the file, or did you only start a new simulation?

Yes, that is the result I had before, now it doesn't work any more... I tried different versions of ccx. 32 bit - 64 bit MT an non MT.
The fact is, that it works a few weeks ago. But not at the moment.

I testet it on 2 different machines, later on Linux.

Now I think the problem is in front of the Screen :-D

I will check it again.. and will check out, how to use the netgen mesher

Thanks a lot for this moment.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Now there are nonpositive jacobian

Post by bernd »

download your file, start FC, load your file, activate the analysis, select the solver, press the run button.

BTW: you are not the first one spending hours on non-positive jacobians. I implemented some highliting. If you use the run button the non-positve should be green. See screen here: https://forum.freecadweb.org/download/file.php?id=38080 Does this word for you. Do you get lots of them?

Mostly it helps to make a finer mesh or add some loads an a fixed face and have a look if a static analysis works.


Bernd
fandaL
Posts: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: Now there are nonpositive jacobian

Post by fandaL »

I can reproduce the problem. It helped when I changed position of the mesh in property editor to move out of axes (to have mesh without nodes with some coordinate being 0). It also helped when I changed positions coordinates like

Code: Select all

*Node, NSET=Nall
...
130, 85.06, -14.75, -3.09452848545541e-014
to

Code: Select all

*Node, NSET=Nall
...
130, 85.06, -14.75, 0
From this perspective, it looks like problem is in the formatting of very low numbers in the inp file.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11203 (Git)
Build type: Release
Branch: master
Hash: e2e1f44b45737f8b900a4ac7766f8f064c434638
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Now there are nonpositive jacobian

Post by UR_ »

fandaL wrote: Thu Jun 01, 2017 10:12 pm

Code: Select all

*Node, NSET=Nall
...
130, 85.06, -14.75, -3.09452848545541e-014
Hello fandaL,
"-3.09452848545541e-014" is an illegal floating point format
ccx reads only F20.0 (i. e. Fortran floating point field 20 chars wide)
pending chars are not accepted, that means -3.09452848545541e-014 becomes -3.09452848545541e-0
That should be avoided.

BTW, i got these jacobians all day long and spend a lot of time figuring out whats going on. :oops:
But i never counted chars :lol:
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Now there are nonpositive jacobian

Post by bernd »

Does it mean we changed the prececision to a to much hight value here: https://github.com/FreeCAD/FreeCAD/blob ... .cpp#L1191 done git commit e58b7479
sirpete83
Posts: 17
Joined: Thu Jun 01, 2017 1:12 pm
Location: 45357, Essen, Germany

Re: Now there are nonpositive jacobian

Post by sirpete83 »

Hey all,
thanks a lot for your fast support!
This workaround works fine for me!

Peter
UR_
Veteran
Posts: 1355
Joined: Tue Jan 03, 2017 8:42 pm

Re: Now there are nonpositive jacobian

Post by UR_ »

bernd wrote: Fri Jun 02, 2017 5:20 am Does it mean we changed the precision to a too much height
Hello bernd,
there is a overhead in iostream caused by signs, decimal separator and exponents.
please have a look at this example

Code: Select all

// floatfield
#include <iostream>     // std::cout, std::defaultfloat

int main () {
  double a = .1234567890123456789;
  double b = -.1234567890123456789;
  double c = 100000000000000000000.;
  double d = -100000000000000000000.;
  double e = -0.1234567890123456789e-101;
  double f = +0.1234567890123456789e+101;
  
  std::cout.precision(13);

  std::cout << "defaultfloat:\n" << std::defaultfloat;
  std::cout << "12345678901234567890\n";
  std::cout << a << '\n' << b << '\n' << c << '\n' << d << '\n' << e << '\n' << f << '\n';

  return 0;
}
output:

Code: Select all

defaultfloat:
12345678901234567890
0.1234567890123
-0.1234567890123
1e+020
-1e+020
-1.234567890123e-102
1.234567890123e+100
for reference please have a look at: http://www.cplusplus.com/reference/ios/defaultfloat/
Post Reply