CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Piston motion with time varying experimental data oscillatingFixedValue (

eno March 12, 2009 18:33

I am using openfoam 1.4 in cyg
I am using openfoam 1.4 in cygwin to solve internal compressible turbulent flow under the motion of a piston. By modifying rhoTurbFoam I can use oscillatingFixedValue in cellMotionUX to define a sinusoidal piston motion Ux = f*(a*sin(2*pi*t)+1). The mesh deforms as expected and the simulation looks reasonable.
Now I want to drive the piston with motions (time varying, no sinusoidal displacement) measured from experiment. How can I do it?

marico March 13, 2009 03:07

Hi, if I remember rightly,

if I remember rightly, this is not trivial. Maybe you can approximate the values analytically and use groovyBC. I tried just yesterday to apply the "standard piston law of motion" (way over time) and it worked perfect.

Best Regards

eno March 13, 2009 16:18

Can I just modify the code to
Can I just modify the code to read and interpolate the external velocity at where Ux = f*(a*sin(2*pi*t)+1) is executed?

eno March 19, 2009 11:06

dang... it's readily there! just modify cellMotionUx (or other initial files) like:

// type oscillatingFixedValue;
// refValue uniform 1.;
// amplitude .2;
// frequency .5;
// value uniform 0;
type timeVaryingUniformFixedValue;
timeDataFileName "pistonVelocity.dat";
value uniform 0;

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