CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   2D VAWT simulation - rpm ramp function? (http://www.cfd-online.com/Forums/openfoam/120694-2d-vawt-simulation-rpm-ramp-function.html)

Boloar July 12, 2013 07:33

2D VAWT simulation - rpm ramp function?
 
Hi all,

I successfully made a 2D VAWT simulation at a constant specified RPM and wind speed.
I'd like to try a slight modification to it, namely: start the RPM at 0 and ramp it up to a given RPM, with wind speed remaining constant, so I can see the airflow interaction. How would I go about doing this?

For info: I used the AMI implementation from the pimpleDyMFoam/propeller tutorial. Based on my rudimentary programming skills, I hope I'd only need to insert some sort of ramp function into dynamicMeshDict? Or would I need to mess with the source code?

Your input is appreciated!

Boloar July 25, 2013 04:03

Is it possible at all?
 
No replies at all makes me think this is an impossible request, but I'd like confirmation of the fact in that case.

linnemann July 25, 2013 14:31

Hi

It is not possible using the built-in methods.

you can look at the openfoam code for solidBodyMotionFunctions

https://github.com/OpenFOAM/OpenFOAM...otionFunctions

You can take the axisRotationMotion and make a new library that could take a table as input. Similar to as how you can use a table for the BC's

https://github.com/OpenFOAM/OpenFOAM...ataEntry/Table

I know this might not be what you were looking for but that is my best bet.

I must say I do not know if it is possible to change the RPM while the case is running. That should be easy to test with your case. You might also run into problems if running in parallel.

There is also the oscillatingRotatingMotion code you could take a look at, that is definitely time varying.

https://github.com/OpenFOAM/OpenFOAM...RotatingMotion

Boloar July 27, 2013 03:28

Quote:

Originally Posted by linnemann (Post 442009)
Hi

It is not possible using the built-in methods.

you can look at the openfoam code for solidBodyMotionFunctions

https://github.com/OpenFOAM/OpenFOAM...otionFunctions

You can take the axisRotationMotion and make a new library that could take a table as input. Similar to as how you can use a table for the BC's

https://github.com/OpenFOAM/OpenFOAM...ataEntry/Table

I know this might not be what you were looking for but that is my best bet.

I must say I do not know if it is possible to change the RPM while the case is running. That should be easy to test with your case. You might also run into problems if running in parallel.

There is also the oscillatingRotatingMotion code you could take a look at, that is definitely time varying.

https://github.com/OpenFOAM/OpenFOAM...RotatingMotion

Thank you linneman, much appreciated. I'll check these out now.

This might be a good thing to put on the to-do list for future OF builds, assuming it isn't already - time-varying parameters would be useful to no end.

linnemann July 30, 2013 07:46

Hi I think you are going to like this as Henry has added some of the stuff you would like.

He has added the possibility to change the omega on run-time.

More here

https://github.com/OpenFOAM/OpenFOAM...e559f51eeb8084

EDIT: See next post for table input

linnemann August 2, 2013 13:34

Ehm I think Henry has come to your rescue :-)

I can see that from the new tutorial for interPhaseChangeDyMFoam that he uses the table as input for omega. So just upgrade to the latest git and you are good to go.

https://github.com/OpenFOAM/OpenFOAM...ynamicMeshDict

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.x                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh  solidBodyMotionFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

solidBodyMotionFvMeshCoeffs
{
    cellZone        innerCylinderSmall;

    solidBodyMotionFunction  rotatingMotion;
    rotatingMotionCoeffs
    {
        origin      (0 0 0);
        axis        (0 1 0);
        omega      table
        (
            (0    0)
            (0.01 419)
            (100  419)
        );
    }
}


// ************************************************************************* //


Boloar August 3, 2013 03:40

Quote:

Originally Posted by linnemann (Post 443533)
Ehm I think Henry has come to your rescue :-)

I can see that from the new tutorial for interPhaseChangeDyMFoam that he uses the table as input for omega. So just upgrade to the latest git and you are good to go.

https://github.com/OpenFOAM/OpenFOAM...ynamicMeshDict

Holy moly, that is awesome. It'd have to be a big table if I want fine-grain control over the RPM, but this is perfect for starters. My thanks to Henry, and thanks to you Linneman for keeping me apprised on this.

linnemann August 3, 2013 04:37

Hi

The table makes linear interpolation between the entries so it does not have to be that big.

Glad to help

Boloar August 3, 2013 04:42

That's good, I didn't think about interpolation. :p
Now all I need is a computer that's somewhat less than 5 years old, to do the simulations faster, hahah

Thanks again! :D


All times are GMT -4. The time now is 16:33.