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

Error in using createBaffles

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 8, 2009, 03:39
Default Error in using createBaffles
  #1
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Dear Foam Fathers,

Good afternonn!

OpenFOAM-1.5
OpenSUSE-11.0
gcc-4.3.1

Procedure to reproduce the error messages is:
Click to download the case: plate20000A1.tar.gz
1. blockMesh
2. faceSet
3. Add another entry in file boundary, name this new patch "plate", as followed,
Code:
    plate
    {
        type            wall;
        nFaces          0;
        startFace       766644;
    }
4. createBaffles plate1 plate
Then:

Code:
lamb@lamb:~/OpenFOAM/lamb-1.5/run/tutorials/oodles/plate20000A1> createBaffles plate1 plate
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5                                   |
|   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Exec   : createBaffles plate1 plate
Date   : Apr 08 2009
Time   : 15:26:51
Host   : lamb
PID    : 15243
Case   : /home/lamb/OpenFOAM/lamb-1.5/run/tutorials/oodles/plate20000A1
nProcs : 1

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

Create mesh for time = 0

Reading faceSet from plate1

Read 920 faces from plate1

Using patch plate at index 4
Reading volScalarField p


bad size -1226266215#0  Foam::error::printStack(Foam::Ostream&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1  Foam::error::abort() in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2  Foam::fvsPatchField<double>::addpatchConstructorToTable<Foam::calculatedFvsPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::surfaceMesh> const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#3  Foam::fvsPatchField<double>::New(Foam::word const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::surfaceMesh> const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"
#4  Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::surfaceMesh> const&, Foam::word const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#5  Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, Foam::dimensionSet const&, Foam::word const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#6  Foam::surfaceInterpolation::makeWeights() const in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#7  Foam::surfaceInterpolation::weights() const in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#8  Foam::fvPatch::weights() const in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#9  Foam::coupledFvPatchField<double>::evaluate(Foam::Pstream::commsTypes) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#10  Foam::cyclicFvPatchField<double>::cyclicFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#11  Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::cyclicFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
#12  Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"
#13  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"
#14  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readField(Foam::Istream&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"
#15  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"
#16  Foam::List<Foam::word> Foam::ReadFields<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::fvMesh>(Foam::fvMesh const&, Foam::IOobjectList const&, Foam::PtrList<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >&, bool) in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"
#17  main in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"
#18  __libc_start_main in "/lib/libc.so.6"
#19  Foam::regIOobject::readIfModified() in "/home/lamb/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/createBaffles"


    From function List<T>::List(const label size)
    in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/List.C at line 54.

FOAM aborting

Aborted
Thanks for any help.
Regards,

Daniel
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog

Last edited by lakeat; April 8, 2009 at 22:17.
lakeat is offline   Reply With Quote

Old   April 8, 2009, 08:09
Default
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 19
niklas will become famous soon enough
Why do you have fixedValue bc on a cyclic?
The number of the startface is not 321432.

so apart from a few mistakes in the supplied case it works for me using 1.5.x

So I would say if it is a bug and not a mistake on your side, this has been fixed already.
niklas is offline   Reply With Quote

Old   April 8, 2009, 11:16
Default
  #3
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Sorry for that I have uploaded a wrong case.

Actually, I'm sure I did not make any mistakes there (I mean fixedValues for cyclic bc, and startSurface number as you mentioned).

So I am compiling version-1.5.x, and see tomorrow if it works or not.

Thank you Niklas!
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   April 8, 2009, 21:06
Default
  #4
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Shame! I made a mistake again, I spent too much time sitting before computer.
It works now. Not a bug, sorry!
And thank you, Niklas!
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog

Last edited by lakeat; April 8, 2009 at 22:16.
lakeat is offline   Reply With Quote

Old   October 30, 2009, 00:56
Default
  #5
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Dear developers,

Hi, I want to report to you again, though not knowing where the bug is, but in my case now, I could run createBaffles using OpenFOAM-1.5-dev, but using OpenFOAM-1.6 ended with a segv. So I guess this is a bug in OpenFOAM-1.6.

So now I will turn on the OpenFOAM-1.5-dev when I need to createBaffles, and then turn back 1.6 for my pisoFoam case, and this works correctly.

I don't know whether you are interested in this.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   October 30, 2009, 08:14
Default
  #6
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Did you try 1.6.x? If so can you post some more information about the failure?

Thanks, Mattijs
mattijs is offline   Reply With Quote

Old   October 30, 2009, 09:53
Default
  #7
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
My pleasure, I will build 1.6.x when my simulation is finished.

BTW, I really love the idea in version 1.6, that the turbulence modeling structure is rearranged, this is perfect in my opinion, for RANS and LES are going nearer and nearer recent years.

Best regards,
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   November 2, 2009, 02:41
Default
  #8
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
FOAM FATAL ERROR:
Cannot find faceZone f0
Valid zones are
0
(
)
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   November 2, 2009, 06:54
Default
  #9
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
the 1.6.x version takes a faceZone instead of a faceSet as in 1.5. For its usage see e.g. Allrun script in the lagrangian/porousExplicitSourceReactingParcelFoam/filter tutorial.
mattijs is offline   Reply With Quote

Old   November 4, 2009, 08:35
Default
  #10
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
It works, thanks a lot.

One more question, is there a way to view the number of each face in paraview, I found faceSet or cellSet utilities are difficult to use.
In my case, in order to select some faces (with different angles), I need to use an inclined box first, and then test each number manually, which is very inconvenient.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   November 4, 2009, 21:38
Default
  #11
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Hi, mattijs!

Could you help and have a look at this, please.
A6.tar.gz
It still goes wrong. The process to reproduce the error is
1. Download the A6 case;
2. blockMesh;
3. use the boundary_AfterPlateAdded to replace the boundary file;
4. (No cellSet and faceSet and setsToZones are needed, since I have already done it, the files are already exist);
5. createBaffles f0 plate -overwrite;

Thank you.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   November 5, 2009, 07:05
Default
  #12
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
The boundary_AfterPlateAdded has an extra patch 'plate' but it has nFaces != 0 so is not a drop-in replacement. Run checkMesh to check.

(why not add plate to your blockMeshDict)

2) you'll probably want to unset FOAM_SIGFPE because the patchFields created on patch plate have no value (since they cannot be mapped from existing patch faces). If they happen to have an illegal value you will get a sigfpe.
mattijs is offline   Reply With Quote

Old   November 5, 2009, 09:10
Default
  #13
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
Thank you, mattijs.

The case is an external flow past a bridge deck (twin box), but under each box (near the center of the whole deck) there is a guide vane. The guide vanes are too small to use blockMesh to handle in a convenient way, so I decided to treat it as a zero thickness plate. So first, I disregard the guide vanes, and build the whole mesh with blockMesh (quite complicated), then I want to use createBaffles to create the guide vanes with zero thicknesses.

That's why I did not add plate to my original blockMeshDict.

In an old post, I remember the way to createBaffles is to modify the boundary file after faceSet is done, (1) modify the patches number, (2) add another patch entry but leave the nFaces empty meanwhile modify the startFace.

You know, I managed to do it successfully in a 2D mesh which is exactly the same as in this case A6 except the spanwise grid number is unity, but in this 3D case I met the segv, and not knowing what was going wrong here.

Quote:
unset unset FOAM_SIGFPE
Howto? Just comment out "unset FOAM_SIGFPE=" in etc/bashrc?

I have tried many possibilities, but to no avail. I don't know why the utility works in 2D case, but fails in 3D.

So sorry, I did not quite understand your answer, I hope my description are clear and enough.

Many thanks.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   November 5, 2009, 12:49
Default
  #14
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
It works on your case.

You can add 'plate' to your blockMeshDict as any other patch but just leave the list of faces empty. Then when you run blockMesh it will create a patch 'plate' with zero faces in it.

FOAM_SIGFPE is a environment variable. See your shell on how to unset it.
mattijs is offline   Reply With Quote

Old   November 5, 2009, 21:39
Default
  #15
Senior Member
 
lakeat's Avatar
 
Daniel WEI (老魏)
Join Date: Mar 2009
Location: South Bend, IN, USA
Posts: 688
Blog Entries: 9
Rep Power: 12
lakeat is on a distinguished road
Send a message via Skype™ to lakeat
O, great, it works now, thank you very much.
__________________
~
Daniel WEI
-------------
NatHaz Modeling Laboratory
Department of Civil & Environmental Engineering & Earth Sciences
University of Notre Dame, USA
Email || My Personal CFD Blog
lakeat is offline   Reply With Quote

Old   March 29, 2010, 10:54
Default
  #16
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Dear lakeat,

I am using version-1.6.
First I generate fluent mesh which has an interior face int_WALL.
Then I use fluent3DMeshToFoam,

in faceZones file has this int_WALL.

so I use
createBaffles int_WALL WALL command.
but it display:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Converting faces on zone int_WALL1 into baffles.

Found 1121 faces on zone int_WALL1



Cannot find patch WALL1
Valid patches are
6
(
INLET
OUTLET
LEFT
RIGHT
TOP
GROUND
)


From function findPatchID(const polyMesh&, const word&)
in file createBaffles.C at line 115.

FOAM exiting
.

Then I add
WALL
{
type wall;
nFaces 0;
startFace 127074;
}
to boundary file,
WALL
{
type wall;
nFaces 0;
startFace 127074;
}

but still have error:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0



Expected a ')' or a '}' while reading PtrList, found on line 56 the word 'WALL1'

file: /home/panda60/OpenFOAM/run/exp/constant/polyMesh/boundary at line 56.

From function Istream::readEndList(const char*)
in file db/IOstreams/IOstreams/Istream.C at line 152.

FOAM exiting

.
How could I solve this problem ?
Thank you.
panda60 is offline   Reply With Quote

Old   March 29, 2010, 12:49
Default
  #17
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
You'll need to adapt the number at the top of the boundary file. It probably still says 6 but you've got 7 entries in there now.
mattijs is offline   Reply With Quote

Old   April 1, 2010, 03:53
Default
  #18
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Dear ,Mattijs

Thank you very much.
Now already OK.

but I have nearly 30 internal walls, it is indeed a large work.
for 1,000,000 mesh, I do this again and again and wait for 2 hours.

If we have command to convert these 30 faceZones to internal walls for only one time ?
Attached Images
File Type: jpg mesh.jpg (102.3 KB, 59 views)
panda60 is offline   Reply With Quote

Old   April 1, 2010, 04:11
Default
  #19
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
No, there is no command to do multiple faceZones.
mattijs is offline   Reply With Quote

Old   April 28, 2010, 05:56
Default
  #20
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Dear Mattijs,
If I want to create an internal patch for sampling, what boundary condition should I set for this patch ?

this patch belongs to internal domain, is not boundary. how should I set for it, then it can be an internal patch, only used for sampling, but doesn't influence the flow ?

If I should use createPatch ? then boundary condition ?

Thank you very much.
Attached Images
File Type: jpg interior.jpg (26.5 KB, 60 views)
panda60 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On



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