|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
VA
Join Date: Mar 2015
Location: ON, Canada
Posts: 30
Rep Power: 12 ![]() |
Hello FOAMers,
I am trying to set-up a very simple geometry ( a rectangular channel) that has cyclic boundary conditions on the side walls. The createPatch works perfectly when the rectangular channel is perfectly straight. The blockMeshDict file looks like: Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(-0.040 0.5 0.0) //1
(0.0400 0.5 0.0) //2
(0.04 1 0.0) //3
(-0.04 1 0.0) //4
(-0.040 0.5 0.05) //5
(0.0400 0.5 0.05) //6
(0.04 1 0.05) //7
(-0.04 1 0.05) //8
);
blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
topWall
{
type symmetry;
faces
(
//top
(4 5 6 7)
);
}
bottomWall
{
type symmetry;
faces
(
//Bottom
(0 1 2 3)
);
}
Inlet
{
type patch;
faces
(
(0 1 5 4)
);
}
leftWall_1
{
type patch;
faces
(
(0 4 7 3)
);
}
rightWall_1
{
type patch;
faces
(
(1 5 6 2)
);
}
Outlet
{
type patch;
faces
(
(3 2 6 7)
);
}
);
mergeMatchPairs();
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclicAMIAMI;s).
pointSync false;
// Patches to create.
patches
(
{
//- Master side patch
name leftWall;
patchInfo
{
type cyclicAMI;
neighbourPatch rightWall;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1e-7;
}
constructFrom patches;
patches (leftWall_1);
}
{
//- Slave side patch
name rightWall;
patchInfo
{
type cyclicAMI;
neighbourPatch leftWall;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
matchTolerance 1e-7;
}
constructFrom patches;
patches (rightWall_1);
}
);
// ************************************************************************* //
Code:
Doing topology modification to order faces. AMI: Creating addressing and weights between 400 source faces and 400 target faces AMI: Patch source sum(weights) min/max/average = 1, 1, 1 AMI: Patch target sum(weights) min/max/average = 1, 1, 1 Not synchronising points. Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
//inclined
(-0.04 0.5 0.0) //1
(0.04 0.5 0.0) //2
(0.54 1 0.0) //3
(0.46 1 0.0) //4
(-0.04 0.5 0.05) //5
(0.04 0.5 0.05) //6
(0.54 1 0.05) //7
(0.46 1 0.05) //8
);
blocks
(
hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
topWall
{
type symmetry;
faces
(
//top
(4 5 6 7)
);
}
bottomWall
{
type symmetry;
faces
(
//Bottom
(0 1 2 3)
);
}
Inlet
{
type patch;
faces
(
(0 1 5 4)
);
}
leftWall_1
{
type patch;
faces
(
(0 4 7 3)
);
}
rightWall_1
{
type patch;
faces
(
(1 5 6 2)
);
}
Outlet
{
type patch;
faces
(
(3 2 6 7)
);
}
);
mergeMatchPairs();
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclicAMIAMI;s).
pointSync false;
// Patches to create.
patches
(
{
//- Master side patch
name leftWall;
patchInfo
{
type cyclicAMI;
neighbourPatch rightWall;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0.5 0 0);
matchTolerance 1e-7;
}
constructFrom patches;
patches (leftWall_1);
}
{
//- Slave side patch
name rightWall;
patchInfo
{
type cyclicAMI;
neighbourPatch leftWall;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0.5 0 0);
matchTolerance 1e-7;
}
constructFrom patches;
patches (rightWall_1);
}
);
// ************************************************************************* //
Code:
Doing topology modification to order faces.
AMI: Creating addressing and weights between 400 source faces and 400 target faces
--> FOAM Warning :
From function AMIMethod<SourcePatch, TargetPatch>::checkPatches()
in file lnInclude/AMIMethod.C at line 57
Source and target patch bounding boxes are not similar
source box span : (0.5 0.5 0.05)
target box span : (0.45792892 0.53879598 0.05)
source box : (-0.04 0.5 0) (0.46 1 0.05)
target box : (0.0010730179 0.4611636 0) (0.45900194 0.99995958 0.05)
inflated target box : (-0.034370599 0.42571998 -0.035443617) (0.49444555 1.0354032 0.085443617)
AMI: Patch source sum(weights) min/max/average = 0.98000598, 1, 0.9990003
AMI: Patch target sum(weights) min/max/average = 0.98000598, 1, 0.9990003
Not synchronising points.
Thanks, Abishek PS: Link for test cases: https://www.dropbox.com/sh/uwj5uq6mo...v15KWIqma?dl=0 |
|
|
|
|
|
|
|
|
#2 |
|
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 130 ![]() ![]() ![]() ![]() ![]() ![]() |
Quick answer: The transformation here cannot be rotational, it has to be translational:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclicAMIAMI;s).
pointSync false;
// Patches to create.
patches
(
{
//- Master side patch
name leftWall;
patchInfo
{
type cyclicAMI;
neighbourPatch rightWall;
transform translational;
separationVector (0.08 0.0 0.0);
matchTolerance 1e-7;
}
constructFrom patches;
patches (leftWall_1);
}
{
//- Slave side patch
name rightWall;
patchInfo
{
type cyclicAMI;
neighbourPatch leftWall;
transform translational;
separationVector (-0.08 0.0 0.0);
matchTolerance 1e-7;
}
constructFrom patches;
patches (rightWall_1);
}
);
// ************************************************************************* //
|
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [swak4Foam] CyclicAMI, groovyBC issues | sherifkadry | OpenFOAM Community Contributions | 21 | January 14, 2021 12:43 |
| time step continuity problem in VAWT simulation | lpz_michele | OpenFOAM Running, Solving & CFD | 5 | February 22, 2018 20:50 |
| Time step continuity error | lpz_michele | OpenFOAM Running, Solving & CFD | 0 | October 12, 2015 07:05 |
| Boundary Layer strange result | fernexda | OpenFOAM Running, Solving & CFD | 14 | January 15, 2015 08:21 |
| problem with cyclicAMI and wall distance | Maff | OpenFOAM Bugs | 5 | August 14, 2014 15:41 |