CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Reference frame solver with GGI (https://www.cfd-online.com/Forums/openfoam-solving/79511-reference-frame-solver-ggi.html)

rieuk August 25, 2010 23:34

Reference frame solver with GGI
 
Hey guys, I'm simulating 2D flapping wing flow and I've so far got rotation to work using GGI -I'm trying to incorporate translation now which should be a straightforward application of a non-inertial reference frame but I'm wondering if there's any solver already designed to do this.

rieuk August 26, 2010 10:03

Now that I think about it, it seems like it might be a little more complicated that I first thought with respect to the boundary conditions. At the moment I have flow over a rotating wing section. But now I'd like to translate it up and down as well. What's the simplest way to do this in OpenFOAM?

rieuk August 27, 2010 04:01

Any ideas? ...If it's just a matter of adding a time dependent acceleration term into the momentum equation then it's simple but do I need to derive the pressure boundary condition at the wing wall or can I leave it as zero-gradient (which is non-physical)?

rieuk August 30, 2010 05:08

What's the syntax to add a sinusoidally varying acceleration term to my momentum equation? Do I create a volScalarField and multiply with mesh().C()? And how do I reference the current time? Using time().value() ??

rieuk September 5, 2010 04:55

Anyway the solution was the following:

Code:

scalar Pi = mathematicalConstant::pi;
dimensionedScalar accCt("accCt",dimensionSet(0,1,-2,0,0,0,0),10000*Foam::cos(2*Pi*runTime.value()/0.5));
 dimensionedVector acc("acc",dimensionSet(0,1,-2,0,0,0,0), vector::zero);

 acc.component(vector::X) = 0.5 * accCt;

acc.component(vector::Y) = 0.5 * Foam::sqrt(3.0) * accCt;

        fvVectorMatrix UEqn
         (
             fvm::ddt(U)
          + fvm::div(phi, U)
            - fvm::laplacian(nu, U)
              ==
          acc

         );
 

        solve(UEqn == -fvc::grad(p));

Now I need to take care of the BCs using sinusoidally varying velocity conditions. What BC can do this? groovyBC?


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