CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   What is DTRIS2 - Fatal error? (https://www.cfd-online.com/Forums/openfoam-solving/67117-what-dtris2-fatal-error.html)

sega August 4, 2009 12:01

What is DTRIS2 - Fatal error?
 
Hello World.

Unfortunately I'm hitting an error message, which I have never seen before.
When running the case I get this strange error:

Code:

Reading field p


DTRIS2 - Fatal error!
  Fails for point number I = 2
  M =  1
  M1 = 2
  X,Y(M)  = -0.199999  -1.0157e-05
  X,Y(M1) = -0.199999  -1.0157e-05
#0  Foam::error::printStack(Foam::Ostream&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigSegv::sigSegvHandler(int) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  ?? in "/lib/libc.so.6"
#3  Foam::timeVaryingMappedFixedValueFvPatchField<double>::interpolate(Foam::Field<double> const&) const in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#4  Foam::timeVaryingMappedFixedValueFvPatchField<double>::checkTable() in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#5  Foam::timeVaryingMappedFixedValueFvPatchField<double>::updateCoeffs() in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#6  Foam::timeVaryingMappedFixedValueFvPatchField<double>::timeVaryingMappedFixedValueFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#7  Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::timeVaryingMappedFixedValueFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#8  Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#9  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#10  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::Istream&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#11  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#12  main in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#13  __libc_start_main in "/lib/libc.so.6"
#14  _start at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Segmentation fault

I don't know what to do with this message.
Be aware that this case it not "ordinary".
I'm toying around with the timeVaryingMappedFixedValue boundary condition.
Maybe there is something wrong, but I don't see it ...

mattijs August 4, 2009 17:13

timeVaryingMapped does a triangulation of the supplied points. You'll get this error if you don't have enough points for a triangulation or they are not in a plane. It works out the plane from the first three points. Switch on its debug flag to see which points it uses.

sega August 4, 2009 17:23

Quote:

Originally Posted by mattijs (Post 225267)
timeVaryingMapped does a triangulation of the supplied points. You'll get this error if you don't have enough points for a triangulation or they are not in a plane. It works out the plane from the first three points. Switch on its debug flag to see which points it uses.

Sounds promising. Can you tell me how I switch on a debug flag?

mattijs August 5, 2009 14:08

Section 3.2.5 in the user guide.

sega August 6, 2009 11:25

Thanks.

So, now I put the entry
Code:

DebugSwitches
{
    timeVaryingMappedFixedValue 1;
}

at the bottom of my controlDict but this changed nothing in the output.

How does this Debug Switch work?

sega August 6, 2009 12:55

Please, consider this problem solved.
I made a severe error with the discretisation which had nothing to do with the boundary condition itself!

sega August 26, 2009 09:53

Quote:

Originally Posted by mattijs (Post 225267)
timeVaryingMapped does a triangulation of the supplied points. You'll get this error if you don't have enough points for a triangulation or they are not in a plane. It works out the plane from the first three points. Switch on its debug flag to see which points it uses.

Sorry mattijs. I have to get back to this problem.
On slightly different geometry I get similar errors with the triangulation.
This time its a "real" problem as I didn't do stupid mistakes with the geometry itself.

First of all I need to know how the debugging flags work (switching them on was easy - see post from August 6th), but I don't know how to extract information out of it.

Just to make this right: The first three points are not forming a plane and that is causing the trouble?!

mattijs August 27, 2009 04:50

I assume that is the problem. Run e.g. the pitzDailyExptInlet with the debug switch on and check especially what the first three points are (used to define the coordinate system). I assume your points are on a line or too close together and the (2D) triangulation routine (Geompack) does not get a correct set of points.

sega August 27, 2009 04:58

Ok, I did it. But I can't find any output connected to the Debug switch.
Is there a file created, or anything similar to look at?!

sega August 27, 2009 08:30

AHA! You don't have to add the DebugSwitch to the cases controlDict!!!

You have to switch it on at the "global" controlDict!?!
(~/OpenFOAM/OpenFOAM-1.5/etc/controlDict)

Well this was not clear to me from the description in the Users Guide!

sega August 27, 2009 08:35

So here we go with the output with activated debug switch!

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.5                                  |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Exec  : icoFoam
Date  : Aug 27 2009
Time  : 14:29:44
Host  : deepblue
PID    : 13295
Case  : /home/sega/OpenFOAM/sega-1.5/run/arcSmall0
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

timeVaryingMappedFixedValue : construct from dictionary
timeVaryingMappedFixedValueFvPatchField : Read 560 sample points from "/home/sega/OpenFOAM/sega-1.5/run/arcSmall0/constant/boundaryData/f0/points"
timeVaryingMappedFixedValueFvPatchField : Used points (1.12104 0.996177 0.8125) (0.808544 1.26307 3.9375) (1.19574 0.90515 2.5625) to define coordinate system with normal (0.693676 0.720244 0.00785374)
readSamplePoints : Dumping triangulated surface to triangulation.stl
readSamplePoints : Dumping face centres to "/home/sega/OpenFOAM/sega-1.5/run/arcSmall0/localFaceCentres.obj"
timeVaryingMappedFixedValueFvPatchField : In directory "/home/sega/OpenFOAM/sega-1.5/run/arcSmall0/constant/boundaryData/f0" found times
21
(
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2
)

findTime : Found time 0 inbetween index:0 time:0 and index:1 time:0.1
checkTable : Reading startValues from "boundaryData/f0/0"
checkTable : Reading endValues from "boundaryData/f0/0.1"
updateCoeffs : Sampled, interpolated values between start time:0 and end time:0.1 with weight:0
updateCoeffs : set fixedValue to min:0 max:0
timeVaryingMappedFixedValue : construct from dictionary
timeVaryingMappedFixedValueFvPatchField : Read 560 sample points from "/home/sega/OpenFOAM/sega-1.5/run/arcSmall0/constant/boundaryData/f1/points"
timeVaryingMappedFixedValueFvPatchField : Used points (1.13735 0.636946 1.9375) (1.16851 0.654397 1.9375) (1.19967 0.671848 1.9375) to define coordinate system with normal (0 0 -1)

DTRIS2 - Fatal error!
  Fails for point number I = 2
  M =  1
  M1 = 2
  X,Y(M)  = -0.28571  -3.97859e-06
  X,Y(M1) = -0.28571  -3.97859e-06
readSamplePoints : Dumping triangulated surface to triangulation.stl
readSamplePoints : Dumping face centres to "/home/sega/OpenFOAM/sega-1.5/run/arcSmall0/localFaceCentres.obj"
timeVaryingMappedFixedValueFvPatchField : In directory "/home/sega/OpenFOAM/sega-1.5/run/arcSmall0/constant/boundaryData/f1" found times
21
(
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2
)

findTime : Found time 0 inbetween index:0 time:0 and index:1 time:0.1
checkTable : Reading startValues from "boundaryData/f1/0"
#0  Foam::error::printStack(Foam::Ostream&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigSegv::sigSegvHandler(int) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  ?? in "/lib/libc.so.6"
#3  Foam::timeVaryingMappedFixedValueFvPatchField<double>::interpolate(Foam::Field<double> const&) const in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#4  Foam::timeVaryingMappedFixedValueFvPatchField<double>::checkTable() in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#5  Foam::timeVaryingMappedFixedValueFvPatchField<double>::updateCoeffs() in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#6  Foam::timeVaryingMappedFixedValueFvPatchField<double>::timeVaryingMappedFixedValueFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#7  Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::timeVaryingMappedFixedValueFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libfiniteVolume.so"
#8  Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#9  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#10  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::Istream&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#11  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#12  main in "/home/sega/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/icoFoam"
#13  __libc_start_main in "/lib/libc.so.6"
#14  _start at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Segmentation fault

Let me tell you what I read from it and maybe you can tell me if I am right?!

So the triangulation for the first patch is ok, but in case of the second face the points are one a line!
Meaning they have equal x3-Coordinates:

Code:

(1.13735 0.636946 1.9375) (1.16851 0.654397 1.9375) (1.19967 0.671848 1.9375)
So to work around this I have to have points at different x3-locations?
Right?

sega August 27, 2009 09:35

Please forgive my impatience. Its obvious that there is a problem with the three points from above being in a line.

What you have to know is that I am gathering the points from a small code I wrote myself. So to avoid such problems with the triangulation I need to know what the condition for a successful triangulation is!

Than I can check the condition while collecting the points and maybe can do some switching to get the right points on top of the list.

Do you understand what I mean?

sega August 27, 2009 09:59

I think I have found the condition and moved with the related questions to a different thread:
http://www.cfd-online.com/Forums/ope...ixedvalue.html

Maybe someone can tell my if I'm on the right track chasing this condition?

camoesas February 23, 2012 03:48

Quote:

Originally Posted by mattijs (Post 225267)
timeVaryingMapped does a triangulation of the supplied points. You'll get this error if you don't have enough points for a triangulation or they are not in a plane. It works out the plane from the first three points. Switch on its debug flag to see which points it uses.

HI,

I am trying to use the timeVaryingMappedFixedValue Function. Iīve already written my files to the boundaryData folder. But now I donīt know how to proceed. How can I triangulate these Values to my BC file in the time Folder.
timeVaryingMapped is unknown to my OF installation. I have checked various other (older as well as newer) installations but I never found a utility like this. Is this the correct name? How can I proceed from my state?

Thanks!

alberto February 24, 2012 03:00

The "mapped" conditions changed in OpenFOAM 2.1.x, however the same operations can be performed:

http://www.openfoam.org/version2.1.0...conditions.php

camoesas February 24, 2012 05:20

thanks for the link, but its no use for me because I am using OF 2.0

alberto February 24, 2012 13:04

Them it is timeVaryingMappedFixedValue (See: ~/OpenFOAM-2.0.x/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/ ).

Best,

camoesas February 28, 2012 03:57

HI Alberto,

I guess we are at cross-purposes. I am not searching the name for the BC, what I am missing are the values within this BC. During runtime I get this error:
Quote:

size 4 is not equal to the given value of 269
So I need the utility to map my data (given in: constant/boundaryData/Patch/points and constant/boundaryData/Patch/timeDirectory/variable) to the variable in the Time directory given below. The Utility must interpolate from my 4 given values the values for all 269 nodes on this patch.
I searched for an utility something like 'timeVaryingMapped' as it is written earlier in this thread. But this is completely unknown to OF (1.5; 1.7; 2.0; 2.1)
These are the files I am using so far:

my BC file is:
Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField  uniform 301.5;

boundaryField
{
    HOT
    {
        type            timeVaryingMappedFixedValue;
        setAverage      0;
        value          nonuniform List<scalar>
      4
        (
          316
          325
          341
          341);
    }
   
    IN
    {
        type            fixedValue;
        value          uniform 301.5;
    }

    OUT
    {
        type            zeroGradient;
    }

    TOP
    {
        type            symmetryPlane;
    }
   
    EMPTY
    {
        type            empty;
    }
   
    WALL
    {
        type            zeroGradient;
    }
   
    SYM
    {
        type            symmetryPlane;
    }
   
}

// ************************************************************************* //

constant/boundaryData/points:

Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

(
 // min y
  (0.2 0 0.0125)
  (0.25 0 0.0125)
  (0.3 0 0.0125)
  (0.8 0 0.0125)
 
 // max y
  (0.2 0.5 0.0125)
  (0.25 0.5 0.0125)
  (0.3 0.5 0.0125)
  (0.8 0.5 0.0125)

)

// ************************************************************************* //

constant/boundaryData/Patch/0/T

Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Average
0

// Data on points
8
(

//miny
316
325
341
341

// maxy
316
325
341
341
)

// ************************************************************************* //

Thanks Camoesas

alberto February 28, 2012 04:21

OK. I misunderstood your question before. Sorry about that.

If the geometry is simple, with some coding you could print out the face centres of the patch corresponding to your BC, and use those to create your input.

As an alternative, if you can provide a functional expression to your BC, you could use GroovyBC (it's on the OpenFOAM wiki, as part of swak4Foam http://openfoamwiki.net/index.php/Contrib/swak4Foam ).

camoesas February 28, 2012 06:37

Hey alberto,

I thought there is maybe an automatic way to map my values to the BC.
(quite naive to think so, this is OF :()
So I have to hard code it in my BC File? I have read about a utility to write out the cell centers. I hope I find it again
What for do I specify the 'points' file and the values in constant/boundaryData/Patch/time/variable if I cant map it to my BC File? Is this just for later times?

Thanks


All times are GMT -4. The time now is 10:10.