CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   help needed: connecting 2 blocks (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/69974-help-needed-connecting-2-blocks.html)

Lexa November 11, 2009 01:48

help needed: connecting 2 blocks
 
4 Attachment(s)
I'm using buoyantPisoFoam solver for this case. I made 2 similar blocks, with 1 block adjacent to other.

Here is the blockMeshDict file:
FoamFile

{

version 2.0;

format ascii;

class dictionary;

object blockMeshDict;

}

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



convertToMeters 0.1;



vertices

(

(0 0 0)

(10 0 0)

(10 5 0)

(0 5 0)

(0 0 10)

(10 0 10)

(10 5 10)

(0 5 10)

(10 0 0)

(20 0 0)

(20 5 0)

(10 5 0)

(10 0 10)

(20 0 10)

(20 5 10)

(10 5 10)



);



blocks

(

hex (0 1 2 3 4 5 6 7) (20 10 20) simpleGrading (1 1 1)

hex (8 9 10 11 12 13 14 15) (20 10 20) simpleGrading (1 1 1)

);



edges

(

);



patches

(

wall floor

(

(0 4 7 3)

)

wall ceiling

(

(10 14 13 9)

)

wall fixedWalls

(

(3 7 6 2)

(2 6 5 1)

(1 5 4 0)

(0 3 2 1)

(4 5 6 7)

(11 15 14 10)

(8 12 15 11)

(9 13 12 8)

(8 11 10 9)

(12 13 14 15)

)

);



mergePatchPairs

(

);



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



the 0/T file is:

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
floor
{
type fixedValue;
value uniform 300;
}

ceiling
{
type fixedValue;
value uniform 320;
}

fixedWalls
{
type zeroGradient;
}
}



and part of the controlDict file is:
startFrom startTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 100;

writeControl timeStep;

writeInterval 1;


When I'm using the solver, i got the error message:

Maximum number of iterations exceeded#0 Foam::error::printStack(Foam::Ostream&) in "/home/alex/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"

#1 Foam::error::abort() in "/home/alex/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"

#2 Foam::hRhoThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::calculate() in "/home/alex/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"

#3 Foam::hRhoThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::correct() in "/home/alex/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"

#4 main in "/home/alex/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/buoyantPisoFoam"

#5 __libc_start_main in "/lib/libc.so.6"

#6 _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116



From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const

in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 68.



FOAM aborting



I try to change the endTime to 300 and the process was successful, but the paraFoam looks strange. I attach 4 files, in t=0,t=100, t=200, and t=300.

My questions are:
1. why I can't simulate until t=1000?
2. if I want to see the gradient of air temperature (different temperature inside the box, not an "uniform" color like this), what should I do?
3. what's going on with those pictures, specially for the last picture (t=300)?
4. how to delete the center wall that separate these 2 blocks? I try not to insert (2 6 5 1) and (8 12 15 11) in the patches, but there's a problem in generating the blockMesh..

Any help will be greatly appreciated.. Thanks!

sega November 13, 2009 06:14

Quote:

Originally Posted by Lexa (Post 235792)
4. how to delete the center wall that separate these 2 blocks? I try not to insert (2 6 5 1) and (8 12 15 11) in the patches, but there's a problem in generating the blockMesh..

If the two areas should be "internal" you must not define them in patches!
Otherwise you have to specify a boundary condition which would make no sense inside your computational domain! Especially "wall" in your case!

If there is a problem with blockMesh (please tell us what kind of problem) without (2 6 5 1) and (8 12 15 11) you should have to take a careful look, there maybe something else whats wrong - but this is on you!

By the way: Why don't you use a single block?

Lexa November 15, 2009 20:13

Thanks for your information, Sebastian..
I'm not using a single block, because my "real" project needs more than 2 blocks that connected each other. before i go into that more complex situation, i think it will be easier to simulate simpler condition first (by using 2 blocks like this).

after I used checkMesh, i got this information: there are 2 regions that not connected each other. and now i think this is the fundamental problem: I didn't connected them so each region will have its independent condition. am I right?
so my next questions, is is possible to make these 2 regions connected each other without changing the blockMeshDict file?

Thanks.

sega November 20, 2009 06:21

Quote:

Originally Posted by Lexa (Post 236360)
so my next questions, is is possible to make these 2 regions connected each other without changing the blockMeshDict file?

I don't know.

But you can make the two blocks connect by altering the blockMeshDict if the "touching faces" are not declared as boundary patches!

sega November 20, 2009 06:47

One problem was that your vertices 1 and 8, 5 and 12, 6 and 15, 2 and 11 are identical.

So the skipping of (2 6 5 1) and (8 12 15 11) in the patch-part of blockMesh was not enough.
You even had to skip building the blocks out of different vertice numbers even if they are geometrically identical.
The connection of the blocks is obviously done by choosing identical vertice numbers!

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  1.6                                  |
|  \\  /    A nd          | Web:      http://www.OpenFOAM.org              |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.1;



vertices

(

(0 0 0)

(10 0 0)

(10 5 0)

(0 5 0)

(0 0 10)

(10 0 10)

(10 5 10)

(0 5 10)

(10 0 0)

(20 0 0)

(20 5 0)

(10 5 0)

(10 0 10)

(20 0 10)

(20 5 10)

(10 5 10)



);



blocks

(

hex (0 1 2 3 4 5 6 7) (20 10 20) simpleGrading (1 1 1)

hex (1 9 10 2 5 13 14 6) (20 10 20) simpleGrading (1 1 1)

);



edges

(

);



patches

(

wall floor

(

(0 4 7 3)

)

wall ceiling

(

(10 14 13 9)

)

wall fixedWalls

(

(3 7 6 2)

// (2 6 5 1)

(1 5 4 0)

(0 3 2 1)

(4 5 6 7)

(2 6 14 10)

// (8 12 15 11)

(9 13 5 1)

(1 2 10 9)

(5 13 14 6)

)

);



mergePatchPairs

(

);



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



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