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

[Commercial meshers] ANSA and AMI patches

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2016, 09:24
Default ANSA and AMI patches
  #1
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
GoodDay all
I am working with a 2D simulation of a vertical axis wind turbine.
I am trying to run a pimpleDyMesh case with an ASNA mesh. Making use of the AMI interface for rotating zones.
I have originally tested the interface, familiarizing myself with the boundary and dynamicMeshDict of openfoam, by creating a rough mesh in blockMesh.
The blockMesh case runs with no issues. So i used this as my base for setting up the files around the ANSA mesh.
for a side by side comparison i have run checkMesh on both cases:
Blockmesh:
Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           6534
    internal points:  0
    faces:            12270
    internal faces:   5730
    cells:            3000
    faces per cell:   6
    boundary patches: 8
    point zones:      0
    face zones:       0
    cell zones:       1

Overall number of cells of each type:
    hexahedra:     3000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"
  <<Writing region 0 with 2000 cells to cellSet region0
  <<Writing region 1 with 1000 cells to cellSet region1

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    inlet               20       42       ok (non-closed singly connected)  
    outlet              40       82       ok (non-closed singly connected)  
    wall                200      404      ok (non-closed singly connected)  
    bladesolo           40       80       ok (non-closed singly connected)  
    blade               80       160      ok (non-closed singly connected)  
    AMI1                80       160      ok (non-closed singly connected)  
    AMI2                80       160      ok (non-closed singly connected)  
    frontAndBack        6000     6534     ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-10 -10 0) (15 10 0.1)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (1.44366e-19 -1.34913e-19 1.75312e-15) OK.
    Max cell openness = 3.42849e-16 OK.
    Max aspect ratio = 11.7063 OK.
    Minimum face area = 0.00244435. Maximum face area = 0.741117.  Face area magnitudes OK.
    Min volume = 0.00034663. Max volume = 0.0741117.  Total volume = 49.641.  Cell volumes OK.
    Mesh non-orthogonality Max: 68.3251 average: 22.9737
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 7.03899, 13 highly skew faces detected which may impair the quality of the results
  <<Writing 13 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
and ANSA ...
Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           199108
    internal points:  0
    faces:            584464
    internal faces:   254316
    cells:            161636
    faces per cell:   5.18931
    boundary patches: 12
    point zones:      0
    face zones:       0
    cell zones:       2

Overall number of cells of each type:
    hexahedra:     30600
    prisms:        131036
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"
  <<Writing region 0 with 6912 cells to cellSet region0
  <<Writing region 1 with 154724 cells to cellSet region1

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    inlet               70       142      ok (non-closed singly connected)  
    topAndBottom        300      604      ok (non-closed singly connected)  
    outlet              70       142      ok (non-closed singly connected)  
    AMI2                158      316      ok (non-closed singly connected)  
    AMI1                158      316      ok (non-closed singly connected)  
    blade1              2040     4080     ok (non-closed singly connected)  
    blade3              2040     4080     ok (non-closed singly connected)  
    blade2              2040     4080     ok (non-closed singly connected)  
    front1              6912     3755     ok (non-closed singly connected)  
    front2              154724   95799    ok (non-closed singly connected)  
    back1               6912     3755     ok (non-closed singly connected)  
    back2               154724   95799    ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-5 -3.5 -2.13163e-16) (10 3.5 0.1)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-1.4656e-18 1.00295e-18 4.87026e-15) OK.
    Max cell openness = 3.14785e-16 OK.
    Max aspect ratio = 5.87566 OK.
    Minimum face area = 2.8342e-09. Maximum face area = 0.169314.  Face area magnitudes OK.
    Min volume = 2.8342e-10. Max volume = 0.0169314.  Total volume = 10.499.  Cell volumes OK.
    Mesh non-orthogonality Max: 55.8689 average: 2.49166
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 9.80996, 12 highly skew faces detected which may impair the quality of the results
  <<Writing 12 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
so i was nto worried about the failed mesh check notification.
I then tested the dynamic Mesh motion of each case:
blockMesh ...
Code:
Create time

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone blade
Time = 0.05
solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.05 transformation: ((0 0 0) (0.999919 (0 0 0.0127497)))
AMI: Creating addressing and weights between 80 source faces and 80 target faces
AMI: Patch source sum(weights) min/max/average = 1.00034, 1.00034, 1.00034
AMI: Patch target sum(weights) min/max/average = 1.00034, 1.00034, 1.00034
--> FOAM Warning : 
    From function solidBodyMotionFvMesh::update()
    in file solidBodyMotionFvMesh/solidBodyMotionFvMesh.C at line 238
    Did not find volVectorField U Not updating Uboundary conditions.
    Point usage OK.
    Upper triangular ordering OK.
    Topological cell zip-up check OK.
    Face vertices OK.
    Face-face connectivity OK.
    Mesh topology OK.
    Boundary openness (-1.30617e-19 -1.34913e-19 1.58417e-15) OK.
    Max cell openness = 2.49435e-16 OK.
    Max aspect ratio = 11.4645 OK.
    Minimum face area = 0.00244435. Maximum face area = 0.741117.  Face area magnitudes OK.
    Min volume = 0.00034663. Max volume = 0.0741117.  Total volume = 49.641.  Cell volumes OK.
    Mesh non-orthogonality Max: 68.3251 average: 22.9737
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 7.03899, 13 highly skew faces detected which may impair the quality of the results
    Failed 1 mesh geometry checks.
    Failed 1 mesh checks.
ExecutionTime = 0.05 s  ClockTime = 0 s

Time = 0.1
solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.1 transformation: ((0 0 0) (0.999675 (0 0 0.0254972)))
AMI: Creating addressing and weights between 80 source faces and 80 target faces
AMI: Patch source sum(weights) min/max/average = 1.00035, 1.00035, 1.00035
AMI: Patch target sum(weights) min/max/average = 1.00035, 1.00035, 1.00035
    Point usage OK.
    Upper triangular ordering OK.
    Topological cell zip-up check OK.
    Face vertices OK.
    Face-face connectivity OK.
    Mesh topology OK.
    Boundary openness (-1.30617e-19 8.50726e-20 1.6968e-15) OK.
    Max cell openness = 2.42229e-16 OK.
    Max aspect ratio = 11.4645 OK.
    Minimum face area = 0.00244435. Maximum face area = 0.741117.  Face area magnitudes OK.
    Min volume = 0.00034663. Max volume = 0.0741117.  Total volume = 49.641.  Cell volumes OK.
    Mesh non-orthogonality Max: 68.3251 average: 22.9737
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 7.03899, 13 highly skew faces detected which may impair the quality of the results
    Failed 1 mesh geometry checks.
    Failed 1 mesh checks.
ExecutionTime = 0.08 s  ClockTime = 0 s
and ANSA...
Code:
Create time

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone rotating
Time = 0.5
solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.5 transformation: ((0 0 0) (0.999688 (0 0 0.0249974)))
AMI: Creating addressing and weights between 158 source faces and 158 target faces
AMI: Patch source sum(weights) min/max/average = 1, 1, 1
AMI: Patch target sum(weights) min/max/average = 1, 1, 1
--> FOAM Warning : 
    From function solidBodyMotionFvMesh::update()
    in file solidBodyMotionFvMesh/solidBodyMotionFvMesh.C at line 238
    Did not find volVectorField U Not updating Uboundary conditions.
    Point usage OK.
    Upper triangular ordering OK.
    Topological cell zip-up check OK.
    Face vertices OK.
    Face-face connectivity OK.
    Mesh topology OK.
    Boundary openness (-1.39392e-18 3.40951e-18 4.92616e-15) OK.
 ***High aspect ratio cells found, Max aspect ratio: 7794.7, number of cells 56852
    Minimum face area = 2.8342e-09. Maximum face area = 0.169314.  Face area magnitudes OK.
    Min volume = 2.8342e-10. Max volume = 0.0169314.  Total volume = 10.499.  Cell volumes OK.
    Mesh non-orthogonality Max: 55.8689 average: 2.49166
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 9.80996, 12 highly skew faces detected which may impair the quality of the results
    Failed 2 mesh geometry checks.
    Failed 1 mesh checks.
ExecutionTime = 1.88 s  ClockTime = 2 s

Time = 1
solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 1 transformation: ((0 0 0) (0.99875 (0 0 0.0499792)))
AMI: Creating addressing and weights between 158 source faces and 158 target faces
AMI: Patch source sum(weights) min/max/average = 1, 1, 1
AMI: Patch target sum(weights) min/max/average = 1, 1, 1
    Point usage OK.
    Upper triangular ordering OK.
    Topological cell zip-up check OK.
    Face vertices OK.
    Face-face connectivity OK.
    Mesh topology OK.
    Boundary openness (-2.40782e-19 3.11987e-18 4.87187e-15) OK.
 ***High aspect ratio cells found, Max aspect ratio: 7814.49, number of cells 56835
    Minimum face area = 2.8342e-09. Maximum face area = 0.169314.  Face area magnitudes OK.
    Min volume = 2.8342e-10. Max volume = 0.0169314.  Total volume = 10.499.  Cell volumes OK.
    Mesh non-orthogonality Max: 55.8689 average: 2.49166
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 9.80996, 12 highly skew faces detected which may impair the quality of the results
    Failed 2 mesh geometry checks.
    Failed 1 mesh checks.
ExecutionTime = 3.59 s  ClockTime = 3 s
again the same output, save for the highly skew faces (the skew faces i assume come from the depth of my 2d mesh. Its 100mm while some of my cells in the XY plane are 0.1mm)
When i actually run the pimplDyMesh solver the ANSA mesh fails while solving the pressure equation.
Code:
Create time

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone rotating

PIMPLE: Operating solver in PISO mode

Reading field p

Reading field U

Reading/calculating face flux field phi

AMI: Creating addressing and weights between 158 source faces and 158 target faces
AMI: Patch source sum(weights) min/max/average = 1, 1, 1
AMI: Patch target sum(weights) min/max/average = 1, 1, 1
Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model kOmegaSST
kOmegaSSTCoeffs
{
    alphaK1         0.85;
    alphaK2         1;
    alphaOmega1     0.5;
    alphaOmega2     0.856;
    gamma1          0.555556;
    gamma2          0.44;
    beta1           0.075;
    beta2           0.0828;
    betaStar        0.09;
    a1              0.31;
    b1              1;
    c1              10;
    F3              false;
}

Reading/calculating face velocity Uf

No finite volume options present

Courant Number mean: 0.0666728 max: 33.287

Starting time loop

Courant Number mean: 0.0666728 max: 33.287
Time = 0.5

solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 0.5 transformation: ((0 0 0) (0.999688 (0 0 0.0249974)))
AMI: Creating addressing and weights between 158 source faces and 158 target faces
AMI: Patch source sum(weights) min/max/average = 1, 1, 1
AMI: Patch target sum(weights) min/max/average = 1, 1, 1
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 1.20093e-05, No Iterations 1000
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 8.59644e-06, No Iterations 1000


--> FOAM FATAL ERROR: 
LHS and RHS of + have different dimensions
     dimensions : [0 3 -1 0 0 0 0] + [0 5 -1 0 0 0 0]


    From function operator+(const dimensionSet&, const dimensionSet&)
    in file dimensionSet/dimensionSet.C at line 478.

FOAM aborting
I think i am missing information in either the boundary file or dynamicMeshdict. If anyone could give me advice i would be very grateful. In attachment are screenshots of each mesh, not the whole mesh but focus on the AMI blade sections. also attached are the boundary and dynmaicMeshDict
Thanks in adv.
Bull
Attached Images
File Type: jpg ansa1.jpg (198.6 KB, 26 views)
File Type: jpg block1.jpg (195.0 KB, 34 views)
Attached Files
File Type: c boundary.c (2.0 KB, 2 views)
File Type: c dynamicMeshDict.c (1.2 KB, 2 views)
bullmut is offline   Reply With Quote

Old   March 25, 2016, 05:24
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
The error message reports some problem about the dimensions.

Quote:
--> FOAM FATAL ERROR:
LHS and RHS of + have different dimensions
dimensions : [0 3 -1 0 0 0 0] + [0 5 -1 0 0 0 0]
Check the difference in the dimensions of your fields (0 folder), for instance:

Code:
$> diff <PATH-TO-ANSA-CASE>/0/ <PATH-TO-BLOCKMESH-CASE>/0/
Probably it reports one of the files (p?) with different dimensions. Fix that and I think it should run.

Regards,
Tom
tomf is offline   Reply With Quote

Old   March 25, 2016, 09:55
Default
  #3
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
Hi tom

Thank for the reply.
I double checked and the p and U folders are the same in both cases.
p = dimensions [0 2 -2 0 0 0 0];
U = dimensions [0 1 -1 0 0 0 0];
I made a duplicate of the pimplDyMesh solver and placed write outs to see exactly which "+ "was giving an error and where in the code this was. In pEqn.h lines 11-16 is where the solver pipes up about dimensions.
Code:
surfaceScalarField phiHbyA
(
"phiHbyA",
(fvc::interpolate(HbyA) & mesh.Sf())
+ rAUf*fvc::ddtCorr(U, phi)
)
Any other takers or further suggestions?
Thanks again for reading and replying. I am at a loss here.
bullmut is offline   Reply With Quote

Old   March 28, 2016, 06:15
Default
  #4
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
In my infinite ignorance i made a simple mistake.
Once i exported the mesh from ANSA i of course adjusted alot of the files to accommodate using pimpleDyMfoam. I however did not update the fvschemes file
In short the error was my use of steadyState instead of Euler for the ddtSchemes section.

apologies for he waste of time but its solved.
Lesson learnt - - ALL FILES need to be adjusted/read/corrected when importing meshes.

Cheers
bullmut is offline   Reply With Quote

Old   March 28, 2016, 08:04
Default
  #5
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Glad to see it is sorted. We also use ANSA, but typically only export the mesh and copy all other case files from tutorials or previously run similar cases.
tomf is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 12:38.