CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   2D vertical axis wind turbine, OpenFOAM beginner (https://www.cfd-online.com/Forums/openfoam/118820-2d-vertical-axis-wind-turbine-openfoam-beginner.html)

Boloar June 5, 2013 03:14

2D vertical axis wind turbine, OpenFOAM beginner
 
Hey all.
I've recently begun using CAELinux, and I've discovered OpenFOAM as a result.
I want to do a small, relatively simple study of a vertical-axis wind turbine. At least (like a lot of things), it seems simple in concept. I have not studied CFD before, but some of the concepts seem fairly intuitive.
There's this video on Youtube which was apparently done using OpenFOAM, but there are no hints on how to recreate their work. I've created a 2D FreeCAD model with three blades and a shaft like they have, but I have no idea (yet) how to define the wind flow, boundaries, rotation, etc.

As this is a side project I might take a lot of time learning how to operate OpenFOAM from scratch - and I'm not exactly a programming or command-line wizard, although I can more or less manage. So if someone can give me guidelines that'd be really great.
I'd just like to set up wind flow from one direction, and plop the model in the middle and see what happens, and then try again with the model rotating. I'm sure it's not as simple as that (I'm reading through the documentation in my free time), but any help is appreciated to speed things up!

Thanks!

linnemann June 5, 2013 03:36

Hi

Here is the case used to produce the movie on Youtube.

https://dl.dropboxusercontent.com/u/...-TSR1.0.tar.gz

Best

Boloar June 5, 2013 03:59

That is ... awesome. :D
Please excuse my surprise, I was expecting a few pointers on the programming, or directions to the documentation, not the original files, hahah.
Thank you very much linneman! This should speed up my learning curve appreciably ^_^

Boloar June 6, 2013 07:46

Can you explain GGI in a relatively simple manner?
 
I've searched online and all I find area a few forum threads from people who already understand its intricacies.
I understand that it allows for a rotating domain, but how does it do so?

linnemann June 6, 2013 09:23

http://www.openfoam.org/version2.1.0/ami.php

Boloar June 6, 2013 23:52

Thank you very much, linneman. I had not seen "arbitrary mesh interface", I thought it was just "General Grid Interface" so that was what I searched for.
Much appreciated!

Boloar June 11, 2013 00:43

change the shape of the non-AMI region
 
Hi linneman,
Thanks for the help so far. After studying the tutorial incompressible/pimpleDyMFoam/mixerVesselAMI2D, I have been able to create a preliminary blockMesh to use with my STL file. I'll start to work on the snappyHexMesh when I have time.

My blockMeshDict file

Right now, the non-AMI region is simply a larger circle around the AMI. Can I perform the airflow analysis like that, or would I need to make it square as in your case to have an inlet/outlet?
If so, could you give me a hint how to make it a square region while maintaining the AMI interface?

Boloar June 18, 2013 02:25

I think I'm making progress. Help will be appreciated!
 
1 Attachment(s)
For a while I had an error trying to run snappyHexMesh, listed here: http://www.cfd-online.com/Forums/ope...or-2d-ami.html
After I made a small hole in the center of the blockMesh, snappy was able to work.

BUT, my blockMesh is being reformed from a square to a circle. Why is this?
Also, the STL files appear to become incorporated as part of the mesh, rather than becoming boundaries. See the attached image. Could someone advise me how to get the VAWT blades to become holes/boundaries in the mesh, rather than part of the mesh?

This is my blockMesh: http://www.cfd-online.com/Forums/att...artialmesh.jpg

After using snappyHexMesh, the result is in the attached image.

Here are my blockMeshDict and snappyHexMeshDict files for your perusal. You should be able to substitute them directly in the tutorials/incompressible/pimpleDyMFoam/ tutorial.

Boloar June 21, 2013 07:38

pimpleDyMFoam crashing!
 
After a fair amount of work, and repurposing the tutorial incompressible/pimpleDyMFoam/propeller, I was successfully able to make a 2D mesh with my VAWT model.
However, when I try to run pimpleDyMFoam, it crashes almost immediately. The mesh generation took me almost 2 weeks to figure out ... I have no idea how to troubleshoot a program crash. Let me know if you need my case files to help!

This is the error:
Code:

Create time

Create mesh for time = 0

Selecting dynamicFvMesh solidBodyMotionFvMesh
Selecting solid-body motion function rotatingMotion
Applying solid body motion to cellZone AMIsurface_z
Reading field p

Reading field U

Reading/calculating face flux field phi

AMI: Creating addressing and weights between 24612 source faces and 24612 target faces
AMI: Patch source weights min/max/average = 2.19635e-06, 1.00181, 0.856611
AMI: Patch target weights min/max/average = 0, 1.80718, 0.854741
Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model kOmegaSST
bounding k, min: 0 max: 0.375 average: 0.375
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2 
 at sigaction.c:?
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  void Foam::divide<Foam::fvPatchField>(Foam::FieldField<Foam::fvPatchField, double>&, Foam::FieldField<Foam::fvPatchField, double> const&, Foam::FieldField<Foam::fvPatchField, double> const&) at ??:?
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#6  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#7  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) at ??:?
#8  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#9  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::average<double>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#10  Foam::bound(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensioned<double> const&) at ??:?
#11  Foam::incompressible::RASModels::kOmegaSST::kOmegaSST(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&, Foam::word const&) at ??:?
#12  Foam::incompressible::RASModel::adddictionaryConstructorToTable<Foam::incompressible::RASModels::kOmegaSST>::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#13  Foam::incompressible::RASModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#14  Foam::incompressible::turbulenceModel::addturbulenceModelConstructorToTable<Foam::incompressible::RASModel>::NewturbulenceModel(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#15  Foam::incompressible::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) at ??:?
#16 
 at ??:?
#17  __libc_start_main at ??:?
#18 
 at ??:?
Floating point exception (core dumped)


GDTech June 24, 2013 04:03

Hi,

That error means you are dividing by zero when initializing your turbulence model. Check your k and omega files and replace zero values by small non zero ones ie. 1e-12.

Hope this help,
Regards.

Boloar June 25, 2013 04:46

Quote:

Originally Posted by GDTech (Post 435539)
Hi,

That error means you are dividing by zero when initializing your turbulence model. Check your k and omega files and replace zero values by small non zero ones ie. 1e-12.

Thanks, for the suggestion; I went and did that, but I'm still getting the same error it seems. No zero values in the initial conditions except in p.

So far I've used the mixerVesselAMI2D and propeller tutorials to try and figure out the AMI stuff. I've got the mesh correct now, but I might be confusing myself with those turbulence models. Gonna look over the wingMotion tutorials again and make sure I'm following that model correctly. Wish me luck.

Thanks!

Boloar July 4, 2013 03:30

Working 2D VAWT wind tunnel!
 
Thanks to the gracious help of Linneman and Kilroy, among others, (and after a month of sweating over it) my VAWT simulation is up and running.
A guide to anyone else who wants to attempt this: I took the rotating AMI implementation from $OPENFOAM_TUTORIALS/incompressible/pimpleDyMFoam/propeller, and attempted to turn it into a 2D mesh using my own STL files. Once the mesh was successfully produced I substituted in the boundary conditions and initial conditions from wingMotion2D/pimpleDyMFoam. After some tweaking it was successful, or at least it hasn't crashed yet ...

lolo August 26, 2013 22:15

how to find the mixerGgiFvMesh file
 
Hi every body
Im trying to simulate a verticale axe wind turbine and the following error message appear :
Unknown dynamicFvMesh type mixerGgiFvMesh

Have I to install a library ?
Where can I find the good library ?

Thanks a lot

Boloar August 26, 2013 23:58

I have not used mixerGgiFvMesh so I cannot advise you there. I am using the latest OpenFOAM 2.2.x from GitHub in Linux. I believe GGI (general grid interface) has been replaced by AMI (arbitrary mesh interface), if I am not mistaken.
What I did is use the tutorial incompressible/pimpleDyMFoam/propeller as a basis for my simulation - it is 3D, but I turned it into a 2D simulation after some work, and used my own STL model files rather than the included .obj models. Then I used the boundary and initial conditions from pimpleDyMFoam/incompressible/wingmotion* to get the fluid conditions for airflow rather than the water flow of the other tutorial.
You will have very little luck with a VAWT simulation if you don't go through those tutorials first. You can take a look at linnemann's files attached in post #2 of this thread, but keep in mind that was made with OpenFOAM 1.6-ext and so is slightly out of date compared to the latest OpenFOAM. It was still helpful as a guide, though. Best of luck!

lolo August 27, 2013 17:48

Thank you for your response.

Now an other problem appears.

I tried to install the old version of OpenFoam 1.6-ext, but now I wanted to get back the 2.2.0 version. I have a mac.
Now I have the following error message :

-bash: wcleanAll: command not found

When I try to compilate all the following error message appears:

Error: Current directory is not $WM_PROJECT_DIR
The environment variables are inconsistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.


I already do this in the ".profile" file :


source OpenFOAM/OpenFOAM-2.2.0/etc/bashrc

When I do :

echo $WM_PROJECT_DIR

Nothing appears !!

I really need help !!

Thanks a lot for your help guys !!

lolo August 28, 2013 10:32

I solved my problem,

Now i have to force to source the environment variable in the terminal thanks to this command line :

. ~/OpenFOAM/OpenFOAM-2.2.0/etc/bashrc




Quote:

Originally Posted by lolo (Post 448392)
Thank you for your response.

Now an other problem appears.

I tried to install the old version of OpenFoam 1.6-ext, but now I wanted to get back the 2.2.0 version. I have a mac.
Now I have the following error message :

-bash: wcleanAll: command not found

When I try to compilate all the following error message appears:

Error: Current directory is not $WM_PROJECT_DIR
The environment variables are inconsistent with the installation.
Check the OpenFOAM entries in your dot-files and source them.


I already do this in the ".profile" file :


source OpenFOAM/OpenFOAM-2.2.0/etc/bashrc

When I do :

echo $WM_PROJECT_DIR

Nothing appears !!

I really need help !!

Thanks a lot for your help guys !!


lolo August 28, 2013 10:35

propeller tutorial
 
Hi Boloar,

I would like to run the propeller tutorial.

Do you the procedure that I have to do ?

I did
./Allrun

and after

pimpleDyMFoam

But the following error message appears :

--> FOAM FATAL IO ERROR:
Cannot find patchField entry for walls

Thanks for your help !

Quote:

Originally Posted by Boloar (Post 448225)
I have not used mixerGgiFvMesh so I cannot advise you there. I am using the latest OpenFOAM 2.2.x from GitHub in Linux. I believe GGI (general grid interface) has been replaced by AMI (arbitrary mesh interface), if I am not mistaken.
What I did is use the tutorial incompressible/pimpleDyMFoam/propeller as a basis for my simulation - it is 3D, but I turned it into a 2D simulation after some work, and used my own STL model files rather than the included .obj models. Then I used the boundary and initial conditions from pimpleDyMFoam/incompressible/wingmotion* to get the fluid conditions for airflow rather than the water flow of the other tutorial.
You will have very little luck with a VAWT simulation if you don't go through those tutorials first. You can take a look at linnemann's files attached in post #2 of this thread, but keep in mind that was made with OpenFOAM 1.6-ext and so is slightly out of date compared to the latest OpenFOAM. It was still helpful as a guide, though. Best of luck!


desert_1250 May 8, 2014 05:54

Hi Foamers
I wanna simulate vertical axis wind turbine in order to it rotates freely because of aerodynamics forces. My target is to calculate the velocity that rotor turns (start up). can every one tell me the steps of doing it using OpenFOAM.
any help is appreciated :)
thanks all
Rasoul

Boloar May 8, 2014 06:59

Quote:

Originally Posted by desert_1250 (Post 490592)
Hi Foamers
My target is to calculate the velocity that rotor turns (start up). can every one tell me the steps of doing it using OpenFOAM.

I don't know if you can figure that with OpenFOAM. You, the user, have to supply the rotation parameters for the simulation mesh - it will not start rotating on its own. If you provide wind-speed parameters and a stationary mesh, it will give you results for a stationary VAWT. To figure out the start-up speed, you'd need to physically build it and test it ... or perhaps go talk to a physicist/aeronautical engineer who can help.

What I did is use the OpenFOAM tutorial
incompressible/pimpleDyMFoam/propeller
as a basis for my simulation - it is a 3D tutorial, but I turned it into a 2D simulation (by making it only one cell thick), and used my own .stl model files rather than the included .obj propeller model files. Then (after some effort) I substituted in the boundary and initial conditions from
incompressible/pimpleDyMFoam/wingmotion*
to get the fluid parameters for airflow rather than the water flow of the original propeller tutorial.
You will have very little luck with a VAWT simulation if you don't go through those tutorials first.

desert_1250 May 8, 2014 12:45

Quote:

Originally Posted by Boloar (Post 490612)
I don't know if you can figure that with OpenFOAM. You, the user, have to supply the rotation parameters for the simulation mesh - it will not start rotating on its own. If you provide wind-speed parameters and a stationary mesh, it will give you results for a stationary VAWT. To figure out the start-up speed, you'd need to physically build it and test it ... or perhaps go talk to a physicist/aeronautical engineer who can help.

What I did is use the OpenFOAM tutorial
incompressible/pimpleDyMFoam/propeller
as a basis for my simulation - it is a 3D tutorial, but I turned it into a 2D simulation (by making it only one cell thick), and used my own .stl model files rather than the included .obj propeller model files. Then (after some effort) I substituted in the boundary and initial conditions from
incompressible/pimpleDyMFoam/wingmotion*
to get the fluid parameters for airflow rather than the water flow of the original propeller tutorial.
You will have very little luck with a VAWT simulation if you don't go through those tutorials first.


dear Boloar
thanks for your quick reply!
I simulated 3kW SB-VAWT using OF and extracted the specification of my turbine, successfully (such as Cp vs Lambda and designed point, power Curve, Torque vs Rotational Speed and etc). this is done about two years ago. After that, (As you told too) I built it and tested in front of wind tunnel. Now, Turbine has a start-up problem and the dead-band region accrues. because of this, i think that the calculation of start up wind speed is very important and necessary. I must know it to reduce the resistance torque such as roller-bearing, Kagging tourqe of the generator, parasitic drag of struts and other resistance forces that there is a possibility.
I think that there is possible to do this using Open-Source OpenFOAM software. I am very happy if any one Shared his experiences in this field.

thanks a lot.
Rasoul


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