CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

simulation of horizontal axis wind turbine using openfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 17, 2019, 14:02
Default simulation of horizontal axis wind turbine using openfoam
  #1
New Member
 
mostafa kamal
Join Date: Jun 2019
Posts: 16
Rep Power: 7
mostafa kamal is on a distinguished road
hello everyone,iam trying to simulate flow on a horizontal axis wind turbine using openfoam
so there are many questions i need your help for :
1- after my search about a solver that solves( incompressible + transient + turbulent + supports moving rotating mesh+SRF) , i found a solver named SRFpimplefoam so is this the suitable solver for my case?

2- the second thing i need to tell you that i made the geometry and the mesh of 1 blade using ansys and i made the meshing on 1 blade with periodic boundary condition and after that i exported the mesh and the openfoam read the mesh file successfully using (FluentMeshToFoam command) with no problems ,after that i searched for any tutorial relating to this i found the rotor2D tutorial but when i ran the SRFpimplefoam it gives error i think because it is a different case

so my basic question: with this mesh file how can i modify the rotor2D tutorial to be a horizontal axis wind turbine?

thanks in advance
Attached Images
File Type: png 1.PNG (118.0 KB, 61 views)
File Type: png 5.PNG (54.0 KB, 54 views)
mostafa kamal is offline   Reply With Quote

Old   June 19, 2019, 07:08
Default
  #2
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi,

You can try using MRF simpleFoam, it is the best way I have found out for simulating the rotating geometries.

Go through the following link, and also for setting up AMI go with propeller tutorial in incompressible pimple folder
https://de.slideshare.net/fumiyanoza...using-openfoam

There are abundant materials available here in this forum for MRF simpleFoam and I hope you can make great progress with it. Go through the following link where you can see a case similar to yours. Periodic cyclic AMI + MRF crashing on pressure

Regards,
Krao
Krao is offline   Reply With Quote

Old   July 1, 2019, 04:49
Default
  #3
New Member
 
mostafa kamal
Join Date: Jun 2019
Posts: 16
Rep Power: 7
mostafa kamal is on a distinguished road
hi, Krao
actually iam using SRFSimpleFoam and iam trying to modify the tutorial of mixer to be my case ,to be honest i faced some problems such that
1- when converting the mesh from ansys to openfoam it converted correctly but the periodic faces haven't been recognized it was patch type in the boundary file so i used createPatchDict to transform to cyclic and it has been transformed then i run check mesh ,but there was 1 check mesh failed (due to skew faces) i don't know is it ok here to run or not ?
2- but when i run the simulation but it crashed because of the residual of time step error increases (divergence problem)

i tried to modify the solver and non orthogonal correctors but same error appeared

so is the problem that making the mesh (having a periodic boundries) with external mesher then converting it to foam is it ok or i should use blockmesh and snappyhexmesh so openfoam can understand better?
mostafa kamal is offline   Reply With Quote

Old   July 1, 2019, 06:02
Default
  #4
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi Mostafa,

The divergence maybe due to the skewness in the mesh.

I usually use cfMesh for meshing and I don't have much experience to convert mesh from one software to another. But there are many people who use ansys or other commercial software for meshing. So, I think it should not be a problem. I also define the cyclic patches using createPatchDict, so there should not be any problem. Did you try running checkMesh after converting the mesh from fluentToFoam? Or try defining the periodic boundaries as normal patches in ansys and then try to rename it using createPatchDict

Krao
Krao is offline   Reply With Quote

Old   July 1, 2019, 08:02
Default
  #5
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Hi,

I read your new post here simulation of horizontal axis wind turbine using SRFSimpleFoam mixer tutorial, where you have given more information. I went through the tutorials and found out that Mixer tutorial uses 'cyclic' condition. For using cyclic you should be having exactly the same mesh on each side of the patch pairs. The properties listed in OpenFOAM manual for 'cyclic' are as follows

-Coupling condition between a pair of patches
-Faces on each coupled patch must have the same topology, i.e. they must have collocated points such a one-to-one mapping exists between the faces on each side.
-The coupling is treated implicitly using the cell values adjacent to each pair of cyclic patches
-The face values are determined using linear interpolation between the cell values


If you go through the boundary files of mixer tutorial it has got exactly the same number of faces on each side,

cyclic_half0
{
type cyclic;
inGroups 1(cyclic);
nFaces 1600;
startFace 101720;
matchTolerance 0.0001;
transform rotational;
neighbourPatch cyclic_half1;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
}
cyclic_half1
{
type cyclic;
inGroups 1(cyclic);
nFaces 1600;
startFace 103320;
matchTolerance 0.0001;
transform rotational;
neighbourPatch cyclic_half0;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
}

Check once again in boundary file whether the patches on each side of cyclic have the same number of faces and also check for the meshing errors. Some times due to sharp corners and non-adequate mesh refinements, the mesher would fail to replicate the geometry

Krao
Krao is offline   Reply With Quote

Old   July 1, 2019, 08:06
Default
  #6
New Member
 
mostafa kamal
Join Date: Jun 2019
Posts: 16
Rep Power: 7
mostafa kamal is on a distinguished road
look at these pictures
mostafa kamal is offline   Reply With Quote

Old   July 1, 2019, 08:12
Default
  #7
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Can you please attach your boundary file? Its in constant/polymesh
Krao is offline   Reply With Quote

Old   July 1, 2019, 09:23
Default
  #8
New Member
 
mostafa kamal
Join Date: Jun 2019
Posts: 16
Rep Power: 7
mostafa kamal is on a distinguished road
thanks krao
i checked the number of faces on each boundry and it was the same number on each cyclic faces
first the boundry file contains the 2 boundreies (wall) that must be peroidic so i changed them to patch then i used createPatchDict to convert these to cyclic but when i run createPatch -overwrite
this error appeared actually iam stuck in this problem for weeks till now
this is the error that appeared
thank you for your responce
Attached Images
File Type: png Screenshot from 2019-07-01 14-23-25.png (57.4 KB, 18 views)
mostafa kamal is offline   Reply With Quote

Old   July 1, 2019, 09:26
Default
  #9
New Member
 
mostafa kamal
Join Date: Jun 2019
Posts: 16
Rep Power: 7
mostafa kamal is on a distinguished road
look at these
(boundry file)
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

6
(
outerWall
{
type wall;
inGroups 1(wall);
nFaces 300;
startFace 2069245;
}
inlet
{
type patch;
nFaces 57;
startFace 2069545;
}
outlet
{
type patch;
nFaces 63;
startFace 2069602;
}
periodic_0
{
type patch;
nFaces 1339;
startFace 2069665;
}
periodic_1
{
type patch;
nFaces 1339;
startFace 2071004;
}
innerWall
{
type wall;
inGroups 1(wall);
nFaces 20452;
startFace 2072343;
}
)

// ************************************************** *********************** //
and this is the createPatchDict
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}

// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
// a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
// is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.

// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
// and centre to make matching easier
// - always create both halves in one invocation with correct 'neighbourPatch'
// setting.
// - optionally pointSync true to guarantee points to line up.

// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
// "face 0 area does not match neighbour 2 by 0.0100005%"
// " -- possible face ordering problem."
// - in polyMesh/boundary file:
// - loosen matchTolerance of all cyclics to get case to load
// - or change patch type from 'cyclic' to 'patch'
// and regenerate cyclic as above

// 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. cyclics).
pointSync false;

// Patches to create.
patches
(
{
// Name of new patch
name cyclic_half0;

// Dictionary to construct new patch from
patchInfo
{
type cyclic;
neighbourPatch cyclic_half1;

// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
// transform translational;
// separationVector (1 0 0);

// Optional non-default tolerance to be able to define cyclics
// on bad meshes
matchTolerance 1E-2;
}

// How to construct: either from 'patches' or 'set'
constructFrom patches;

// If constructFrom = patches : names of patches. Wildcards allowed.
patches (periodic_0);

// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name cyclic_half1;

// Dictionary to construct new patch from
patchInfo
{
type cyclic;
neighbourPatch cyclic_half0;

// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.
transform rotational;
rotationAxis ( 0 0 1 );
rotationCentre ( 0 0 0 );
}

// How to construct: either from 'patches' or 'set'
constructFrom patches;

// If constructFrom = patches : names of patches. Wildcards allowed.
patches (periodic_1);

// If constructFrom = set : name of faceSet
set f0;
}
);
mostafa kamal is offline   Reply With Quote

Old   July 1, 2019, 10:00
Default
  #10
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
Go through this link once Problem with cyclic boundaries in Openfoam 2.3, mesh import from ICEM

Try running renumberMesh -overwrite, before createpatchdict. Comment out this line 'set f0;'. Since the new patches are not created by face set. Apart from this I don't see any problem

A sample of mine is attached for your reference

pointSync false;

// Patches to create.
patches
(
{
//- Master side patch
name AMI1;
patchInfo
{
type cyclicAMI;
matchTolerance 0.1;
neighbourPatch AMI2;
transform noOrdering;
}
constructFrom patches;
patches (cylinderInner);
}

{
//- Slave side patch
name AMI2;
patchInfo
{
type cyclicAMI;
matchTolerance 0.1;
neighbourPatch AMI1;
transform noOrdering;
}
constructFrom patches;
patches (cylinderOuter);
}
}

If nothing works out try cyclicAMI instead cyclic as cyclic requires exact face matching at each and every point

Last edited by Krao; July 1, 2019 at 10:07. Reason: Added renumbermesh
Krao is offline   Reply With Quote

Old   July 1, 2019, 10:30
Default
  #11
New Member
 
mostafa kamal
Join Date: Jun 2019
Posts: 16
Rep Power: 7
mostafa kamal is on a distinguished road
thank you i tried what you said but unfortunatly when i run createPatchDict it gave me this error in 1.png it is a lot of sentences trying to order faces

then after it finished it tells me
''face 0 area does not match neighbour by 183.163% -- possible face ordering problem'' as attached in 1.png

actually this error is still appearing in my trials through cyclic

when i used cyclicAMI instead of cyclic it gives me this 3.png a divergence problem

i still don't know if the problem is preparing the configuration of my problem in the case file or the problem is the mesh itself that i must use blockmesh and snappyhexmesh

thanks krao
Attached Images
File Type: png 1.png (90.0 KB, 12 views)
File Type: png 2.png (79.3 KB, 6 views)
File Type: jpg 3.jpg (144.3 KB, 11 views)
mostafa kamal is offline   Reply With Quote

Old   July 1, 2019, 11:06
Default
  #12
Senior Member
 
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8
Krao is on a distinguished road
I think it should be with meshing. Go through this link Setting up cyclic boundary condition fully and read the last comment carefully. I hope you solve the problem, all the best.
Krao is offline   Reply With Quote

Reply

Tags
hawt wind turbine, openfoam, srfpimplefoam


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFD analysis on wind turbine rotor Ken (Wind Turbine CFD Super Rookie) Main CFD Forum 45 February 9, 2016 15:07
Analysis of horizontal axis wind turbine Aneeq raheem Main CFD Forum 0 January 25, 2016 11:26
Hybrid Meshing for horizontal axis wind turbine Eslam Hashem Pointwise & Gridgen 7 September 15, 2014 15:52
Transient analysis of horizontal axis wind turbine UmeProIITG FLUENT 0 August 7, 2014 07:44
Simulation of Vertical axis wind turbine sasasa FLUENT 7 April 17, 2014 09:03


All times are GMT -4. The time now is 21:07.