Dear all,
I observed for 2
Dear all,
I observed for 2D cases that the nonOrthogonality() and faceNonOrthogonality() functions in cellQuality can cause a 'floating points exceptions'. This occurs in the calculation of cosDDotS = Foam::acos((d & s)/(mag(d)*magS + VSMALL)), apparently VSMALL is too small and indeed, when I change this in SMALL, everything works fine again. Regards, Frank |
The problem is that for very s
The problem is that for very small geometries you will find that SMALL is too big. I guess we will need to make VSMALL a bit bigger, could you find out how much bigger VSMALL has to be for your case?
Thanks H |
I already did that. in my case
I already did that. in my case VSMALL need to be 1e-16, so almost SMALL.
The case is not very small, just a moving 2D block on a 2D domain which is 25 squared. Overall domain bounding box (-12.5 -12.5 -0.1) (12.5 12.5 0.1). Frank |
Is the problem in acos getting
Is the problem in acos getting a number >1 or in the division?
Could you try something like Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))) |
Just my two cents: the point i
Just my two cents: the point in that VSMALL constant is to avoid division by zero, and get zero if (d&s) is zero, is it? How about replacing it with max(VSMALL,SMALL*max(mag(d),mag(s))) or something similar that would correlate it to the local sizes. But I havn't looked at the full source so I may be talking nonsense
Bernhard |
Thanks Mattijs, this solved th
Thanks Mattijs, this solved the problem.
Frank |
All times are GMT -4. The time now is 01:03. |