CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

segmentation error

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2011, 11:36
Default segmentation error
  #1
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
Hello everybody,

I want to correct a boundary condition of a variable called “nHatfv” by means of working with “nHapt” in these lines:


surfaceVectorField::GeometricBoundaryField& nHatb = nHatfv.boundaryField();
const fvBoundaryMesh& boundary = mesh.boundary();
forAll(boundary, patchi)
{
fvsPatchVectorField& nHatp = nHatb[patchi];
vectorField nf = boundary[patchi].nf();
scalarField a12 = nHatp & nf;
scalarField b2(nHatp.size());
forAll(b2,facei)
{
b2[facei] = Foam::cos(Foam::acos(a12[facei]));
}
nHatp /=b2*a12;
}

The solver compiles Ok without errors, but when I want to run my tutorial, I have the folllowing error:

#0 Foam::errorprintStack(Foam::Ostream&) in "/home/isabel/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/isabel/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xb807a400]
#3 main in "/home/isabel/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/informe24"
#4 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#5 _start at /build/buildd/glibc-2.9/csu/../sysdeps/i386/elf/start.S:122
Segmentation error


and I saw that the error dissapears if I supress these lines:


forAll(b2,facei)
{
b2[facei] = Foam::cos(Foam::acos(a12[facei])-theta[facei]);
}


But I need these lines. What can I do?
isabel is offline   Reply With Quote

Old   March 1, 2011, 11:40
Default
  #2
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Let me guess - do you have any empty patches?
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   March 2, 2011, 02:22
Default
  #3
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
May be, in the first lime I equal “nHatb = nHatfv.boundaryField()”, but I did not defined nHatfv in my “createFields.H”.



Is this the problem?
isabel is offline   Reply With Quote

Old   March 2, 2011, 02:23
Default
  #4
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
May be, in the first lime I equal “nHatb = nHatfv.boundaryField()”, but I did not defined nHatfv in my “createFields.H”.

Is this the problem?
isabel is offline   Reply With Quote

Old   March 2, 2011, 02:25
Default
  #5
Senior Member
 
isabel
Join Date: Apr 2009
Location: Spain
Posts: 171
Rep Power: 16
isabel is on a distinguished road
May be, in the first lime I equal “nHatb = nHatfv.boundaryField()”, but I did not defined nHatfv in my “createFields.H”.

Is this the problem?
isabel is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF: DEFINE_CG_MOTION for vertical jump motion of an electrode! alban Fluent UDF and Scheme Programming 2 June 8, 2010 18:54
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 20:11
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
user defined function cfduser CFX 0 April 29, 2006 10:58


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