CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

Cyclic BC how to obtain exact same meshes?

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 12, 2014, 18:23
Default Cyclic BC how to obtain exact same meshes?
  #1
Member
 
phil
Join Date: Oct 2013
Posts: 33
Rep Power: 3
gelbebanane is on a distinguished road
Hi,
i want to simulate a steady state pipe flow the inlet and outlet are cyclic BC. I import my geometry through a .stl file. The problem is the mesh at the inlet and outlet are not from the same size and i cant make them cyclic with the "createPatch" utility.
How can i achieve this?

Hope i made my point

Greetings & good night
gelbebanane is offline   Reply With Quote

Old   January 13, 2014, 01:11
Default
  #2
Member
 
Akshay Kumar
Join Date: Aug 2010
Posts: 67
Rep Power: 6
Akshay is on a distinguished road
Hi1

Use cyclicAMI for the two patches. This should do the job.
Akshay is offline   Reply With Quote

Old   January 13, 2014, 04:49
Default
  #3
Member
 
phil
Join Date: Oct 2013
Posts: 33
Rep Power: 3
gelbebanane is on a distinguished road
Hey,
i've already tried to run it as cyclicAMI but the problem is the error:
Code:
AMI: Creating addressing and weights between 142345 source faces and 142177 target faces
--> FOAM Warning : 
    From function AMIInterpolation<SourcePatch, TargetPatch>::checkPatches(const SourcePatch&, const TargetPatch&)
    in file lnInclude/AMIInterpolation.C at line 109
    Source and target patch bounding boxes are not similar
    source box span     : (0.000115329 0.0987398 0.152781)
    target box span     : (8.22414e-05 0.0987483 0.152795)
    source box          : (0.00671131 1.90699e-06 -0.00673927) (0.00682664 0.0987417 0.146042)
    target box          : (0.0301843 1.448e-06 0.0167262) (0.0302665 0.0987498 0.169521)
    inflated target box : (0.0210879 -0.0090949 0.00762988) (0.0393629 0.107846 0.178617)
Have you any idea how i can fix it?

Greetings
gelbebanane is offline   Reply With Quote

Old   January 13, 2014, 05:01
Default
  #4
Member
 
Akshay Kumar
Join Date: Aug 2010
Posts: 67
Rep Power: 6
Akshay is on a distinguished road
I see a warning not an error. Can you post the entire log?
Akshay is offline   Reply With Quote

Old   January 13, 2014, 05:49
Default
  #5
Member
 
phil
Join Date: Oct 2013
Posts: 33
Rep Power: 3
gelbebanane is on a distinguished road
Yep,
here it is. I create the cyclicAMI patches after my sHM parallel run with
Code:
createPatch -overwrite
Code:
t
>createPatch -overwrite
....
Build  : 2.2.x-ae7a43cbbfe3
Exec   : createPatch -overwrite
Date   : Jan 13 2014
Time   : 10:46:56
Host   : 
PID    : 28596
Case   :
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create polyMesh for time = 0

Reading createPatchDict

Adding new patch inlet as patch 4 from 
{
    type            cyclicAMI;
    neighbourPatch  outlet;
}

Adding new patch outlet as patch 5 from 
{
    type            cyclicAMI;
    neighbourPatch  inlet;
}


Moving faces from patch eingang to patch 4
Moving faces from patch ausgang to patch 5

Doing topology modification to order faces.

AMI: Creating addressing and weights between 142345 source faces and 142177 target faces
--> FOAM Warning : 
    From function AMIInterpolation<SourcePatch, TargetPatch>::checkPatches(const SourcePatch&, const TargetPatch&)
    in file lnInclude/AMIInterpolation.C at line 109
    Source and target patch bounding boxes are not similar
    source box span     : (0.000115329 0.0987398 0.152781)
    target box span     : (8.22414e-05 0.0987483 0.152795)
    source box          : (0.00671131 1.90699e-06 -0.00673927) (0.00682664 0.0987417 0.146042)
    target box          : (0.0301843 1.448e-06 0.0167262) (0.0302665 0.0987498 0.169521)
    inflated target box : (0.0210879 -0.0090949 0.00762988) (0.0393629 0.107846 0.178617)


--> FOAM FATAL ERROR: 
Unable to find initial target face

    From function void Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcAddressing(const SourcePatch&, const TargetPatch&, label, label)
    in file lnInclude/AMIInterpolation.C at line 712.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   at cyclicAMIPolyPatch.C:0
#3  Foam::AMIInterpolation<Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> >, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > >::update(Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&) in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/libmeshTools.so"
#4  Foam::AMIInterpolation<Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> >, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > >::AMIInterpolation(Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::autoPtr<Foam::searchableSurface> const&, Foam::faceAreaIntersect::triangulationMode const&, bool) in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/libmeshTools.so"
#5  Foam::cyclicAMIPolyPatch::resetAMI() const in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/libmeshTools.so"
#6  Foam::polyBoundaryMesh::movePoints(Foam::Field<Foam::Vector<double> > const&) in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#7  Foam::polyMesh::movePoints(Foam::Field<Foam::Vector<double> > const&) in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#8  
 in "/sw/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64GccDPOpt/bin/createPatch"
#9  __libc_start_main in "/lib64/libc.so.6"
#10  
 at /usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/x86_64/elf/start.S:116
Abgebrochen
>
and i want to edit the boundary file because it looks like that:
Code:
FoamFile
{
    version     2.0;
    format      binary;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    defaultFaces
    {
        type            empty;
        inGroups        1(empty);
        nFaces          0;
        startFace       6220988;
    }
    eingang
    {
        type            wall;
        nFaces          142345;
        startFace       6220988;
    }
    ausgang
    {
        type            wall;
        nFaces          142177;
        startFace       6363333;
    }
    wand
    {
        type            wall;
        nFaces          313335;
        startFace       6505510;
    }
)

// ************************************************************************* //
gelbebanane is offline   Reply With Quote

Old   January 22, 2014, 06:20
Default
  #6
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 5
Ruli is on a distinguished road
How does your createPatchDict look?

Julian
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   January 22, 2014, 09:04
Default
  #7
Member
 
phil
Join Date: Oct 2013
Posts: 33
Rep Power: 3
gelbebanane is on a distinguished road
Hey,
I'm 2 steps further.
First of all i am able to use createPatch without errors. Here is the "createPatch" output and my createPatchDict file attached.
file@bottom
Quote:
Create time

Create polyMesh for time = 0

Reading createPatchDict

Adding new patch inlet as patch 4 from
{
type cyclicAMI;
neighbourPatch outlet;
transform translational;
separationVector ( 0.0332 0 0 );
matchTolerance 0.001;
}

Adding new patch outlet as patch 5 from
{
type cyclicAMI;
neighbourPatch inlet;
transform translational;
separationVector ( -0.0332 0 0 );
matchTolerance 0.001;
}


Moving faces from patch eingang to patch 4
Moving faces from patch ausgang to patch 5

Doing topology modification to order faces.

AMI: Creating addressing and weights between 13756 source faces and 13639 target faces
AMI: Patch source weights min/max/average = 0.144171, 1.11922, 0.99572
AMI: Patch target weights min/max/average = 0.629266, 1.3752, 0.989389
Not synchronising points.

Removing patches with no faces in them.

Removing zero-sized patch defaultFaces type empty at position 0
Removing zero-sized patch eingang type wall at position 1
Removing zero-sized patch ausgang type wall at position 2
Removing patches.
Writing repatched mesh to 0

End
As you can see i distinguished the non overlapping faces and through this also the 0 weights.

But now i am hanging after calculating the velocity field (simpleFoam solver).
Quote:
st5> simpleFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.x-ae7a43cbbfe3
Exec : simpleFoam
Date : Jan 22 2014
Time : 13:31:14
Host : "i"
PID : 25790
Case :
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

AMI: Creating addressing and weights between 5000 source faces and 5000 target faces
AMI: Patch source weights min/max/average = 0.984197, 1, 0.999811
AMI: Patch target weights min/max/average = 0.973747, 1, 0.999694
Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kOmegaSST
bounding k, min: 0 max: 0.3 average: 0.3
kOmegaSSTCoeffs
{
alphaK1 0.85034;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.85616;
gamma1 0.5532;
gamma2 0.4403;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
b1 1;
c1 10;
F3 false;
}

No finite volume options present


SIMPLE: no convergence criteria found. Calculations will run for 100 steps.


Starting time loop

Time = 1

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 2.74716e-12, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 4.08486e-13, No Iterations 20
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 3.08847e-13, No Iterations 20


--> FOAM FATAL ERROR:
Size mismatch.
Source patch size:5000
Source agglomeration size:2500
Target patch size:5000
Target agglomeration size:2500

From function AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation( const AMIInterpolation<SourcePatch, TargetPatch>&, const labelList&, const labelList&)
in file lnInclude/AMIInterpolation.C at line 1319.

FOAM exiting
This error excerpt is from my blockMesh compare case. As you can see the sizes are exactly of the same size. With my real case i get the same error but i wanted to test if the error belongs to the different number in cells but it doesn't. Pretty weired that it does not even work on an easy block case where the geometry planes must have the same geometric size.

Have you any further suggestions?

Greetings
Phil
____________
UPDATE:
createPatchDict: createPatchDict.txt
Metti likes this.

Last edited by gelbebanane; January 22, 2014 at 11:45. Reason: file
gelbebanane is offline   Reply With Quote

Old   January 22, 2014, 11:27
Default
  #8
Member
 
Chris L
Join Date: Sep 2012
Posts: 36
Rep Power: 4
vbchris is on a distinguished road
You attachment "Attachment 28173" is a dead link can you repost?

Chris
vbchris is offline   Reply With Quote

Old   January 23, 2014, 09:11
Default
  #9
Member
 
phil
Join Date: Oct 2013
Posts: 33
Rep Power: 3
gelbebanane is on a distinguished road
Hey,
and again im 1 step furhter.
The problem was solved like in this case by changing the solver for p (where the solver crashed) to something else.
gelbebanane is offline   Reply With Quote

Old   January 23, 2014, 09:18
Default
  #10
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 5
Ruli is on a distinguished road
Quote:
Originally Posted by gelbebanane View Post
by changing the solver for p (where the solver crashed) to something else.
Which solver did you use before? I am using GAMG and AMI in combination succesfully...
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   January 23, 2014, 12:02
Default
  #11
Member
 
phil
Join Date: Oct 2013
Posts: 33
Rep Power: 3
gelbebanane is on a distinguished road
I have used the GAMG and now i switched to smoothSolver it is working but it needs over 1000 iterations to calculate. I use simpleFoam as CFD code what do you use with your AMI BC?

Greetings
gelbebanane is offline   Reply With Quote

Old   January 23, 2014, 13:24
Default
  #12
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 5
Ruli is on a distinguished road
Quote:
Originally Posted by gelbebanane View Post
I use simpleFoam as CFD code what do you use with your AMI BC?
I use MRFSimpleFoam.
__________________
πάντα ῥεῖ - Heraclitus
Ruli is offline   Reply With Quote

Old   January 29, 2014, 05:16
Default
  #13
Member
 
Akshay Kumar
Join Date: Aug 2010
Posts: 67
Rep Power: 6
Akshay is on a distinguished road
Hi Phil

Can you check if your 'mergeLevels' for the GAMG solver is >1 ? If yes then make it '1' and try running it .

Akshay
Akshay is offline   Reply With Quote

Old   August 3, 2014, 23:28
Question cyclicAMI
  #14
New Member
 
Mehid
Join Date: Nov 2013
Location: Tehran-Iran
Posts: 22
Rep Power: 3
Metti is on a distinguished road
Hi Phil,

I don't get how you passed the createPatch step..?

you just said that you are 2 steps furthur. my problem is exactly there.

after SHM when i want to change my BC's with "createPatch", i came to the error of

[AMI: Creating addressing and weights between 98 source faces and 99 target faces
--> FOAM Warning :
From function AMIInterpolation<SourcePatch, TargetPatch>::checkPatches(const SourcePatch&, const TargetPatch&)
in file lnInclude/AMIInterpolation.C at line 111
Source and target patch bounding boxes are not similar
source box span : (105.417 80.3913 20.3297)
target box span : (104.946 81.1113 20.031)
source box : (-105 -79.9299 4.69853) (0.417155 0.461361 25.0282)
target box : (-104.448 77.2405 5) (0.497791 158.352 25.031)
inflated target box : (-111.155 70.5334 -1.70707) (7.20486 165.059 31.7381)


--> FOAM FATAL ERROR:
Unable to find initial target face]

what's the procedure..?
Metti is offline   Reply With Quote

Old   August 6, 2014, 05:14
Default
  #15
New Member
 
Mehid
Join Date: Nov 2013
Location: Tehran-Iran
Posts: 22
Rep Power: 3
Metti is on a distinguished road
yep..,

the problem is solved.
I got it myslfe.

Thanks anyway.
Metti is offline   Reply With Quote

Old   September 12, 2014, 09:50
Default
  #16
New Member
 
Mehid
Join Date: Nov 2013
Location: Tehran-Iran
Posts: 22
Rep Power: 3
Metti is on a distinguished road
Hey Foamers,

I'm being stopped. after SHM & createPatch for cyclicAMI faces when running simpleFOAM, it crashes out with the following error:

Quote:
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

AMI: Creating addressing and weights between 420 source faces and 476 target faces
AMI: Patch source weights min/max/average = 0.67855, 1.0136, 0.995154
AMI: Patch target weights min/max/average = 0, 1.03575, 0.983427
AMI: Creating addressing and weights between 768 source faces and 807 target faces
AMI: Patch source weights min/max/average = 0.898335, 1.03752, 0.999786
AMI: Patch target weights min/max/average = 0.0196412, 1.03748, 0.98675
Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 2.77762e-05 max: 0.00874534
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 1.4691e-06, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 1.20568e-06, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 4.8961e-08, No Iterations 1
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 Uninterpreted:
#3 Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:?
#4
at ??:?
#5
at ??:?
#6 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#7
at ??:?
Floating point exception (core dumped)
and non of changing solver or other tips of the previous post on this thread couldn't change the situation.
I'm still stuck in my progress.

share your Tips if possible for help.

Thanks in Advance,

best regards,
Metti.
Metti is offline   Reply With Quote

Old   December 29, 2014, 16:24
Default
  #17
New Member
 
Ferdinand Leinbach
Join Date: Nov 2014
Posts: 9
Rep Power: 2
effi is on a distinguished road
Quote:
Originally Posted by Metti View Post
yep..,

the problem is solved.
I got it myslfe.

Thanks anyway.
Could you please share your solution after the OP already didn't share his?
Im looking at a similar issue
effi is offline   Reply With Quote

Old   December 30, 2014, 09:32
Default
  #18
New Member
 
Mehid
Join Date: Nov 2013
Location: Tehran-Iran
Posts: 22
Rep Power: 3
Metti is on a distinguished road
dear Ferdinand,

I know nothing of your case details but ...

what I did, was to get along with the Phill's procedure BUT the final point that he didn't mentioned was to change the option "writePrecision" in controlDict from 6 to a higher level like 10 or ... .

by this, I finally became able to change my patches' type to cyclicAMI without any error, BUT even after that till now I wasn't able to RUN since it crashes out and I haven't found out why ,yet.

Best,
Metti is offline   Reply With Quote

Old   January 24, 2015, 10:50
Default
  #19
New Member
 
Ferdinand Leinbach
Join Date: Nov 2014
Posts: 9
Rep Power: 2
effi is on a distinguished road
Dear Metti,

i got mine to work and not crash!
What I did was (I generated my mesh in Pointwise):
Set the boundaries I wanted to be cyclic to patches.
Used the createPatch utility to transform these to cyclic boundary conditions.
Then renumbered the mesh with renumberMesh.
Voila, it stopped complaining for me!
effi is offline   Reply With Quote

Old   January 25, 2015, 16:52
Default
  #20
New Member
 
Mehid
Join Date: Nov 2013
Location: Tehran-Iran
Posts: 22
Rep Power: 3
Metti is on a distinguished road
Hey effi,

So, u suggest to mesh in another software?

(From what i can undrestand from u're post )The way that u are mentioning, is to import the mesh from other tools (and i'm aware of that and of course i did it before and made my case RUN) But the problem was to deal with meshing for complex curved geometries including periodic patches in OF. specifically with SHM.

Correct me if i misundrestood that.

Best.
Metti 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Menter's SST model low-Re issue has not been seriously investigated? vkrastev OpenFOAM 57 June 12, 2014 21:21
Error during initialization of "rhoSimpleFoam" kornickel OpenFOAM Running, Solving & CFD 8 September 17, 2013 05:37
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
HELP!! How could I obtain structured-orthogonal-body fitted meshes???? DajeMoo ANSYS 0 January 28, 2011 13:52
Quadratic interpolation to obtain exact solution of Poiseuille flow kar OpenFOAM Running, Solving & CFD 0 March 25, 2008 04:31


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