Oscillating Airfoil and Independently Oscillating Flap

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 24, 2010, 20:07 Oscillating Airfoil and Independently Oscillating Flap #1 Senior Member   Daniel Join Date: Jul 2009 Location: Montreal, Canada Posts: 154 Rep Power: 9 Good evening all, I am having some difficulty modifying the pointPatchField angularOscillatingDisplacement to allow me to oscillate a flap on an airfoil which itself is also oscillating. Without modification, this pointPatchField will allow me to do either the whole airfoil-flap combination or simply the flap, but I would like to oscillate the airfoil in one direction, and have the flap oscillate in the opposite direction. I modified angularOscillatingDisplacement to read separate dictionary values for both the flap and airfoil motion, but I cannot modify lines 165-170 of angularOscillatingDisplacementPointPatchVectorFiel d.C to produce an operator that will affect the rotation about each axis (errors are produced if I try to introduce an "axisHatFlap" into the equation as in addition to the "axisHat"): Code: ``` vectorField::operator= ( p0Rel*(cos(angle) - 1) + (axisHat ^ p0Rel*sin(angle)) + (axisHat & p0Rel)*(1 - cos(angle))*axisHat );``` I have a few ideas to get around this: I could modify the code to perform the airfoil rotation, then run the same code a second time with references to the flap-only rotation parameters. An easier solution would be to modify the operator to reflect the rotation about the two axes, though that does not seem to work. Unfortunately, I cannot figure out how to modify the code to do either. Can anyone offer some guidance? Thank you, Dan

 August 24, 2010, 21:16 Some Progress... #2 Senior Member   Daniel Join Date: Jul 2009 Location: Montreal, Canada Posts: 154 Rep Power: 9 It looks like it would work if I could call Code: `fixedValuePointPatchField::updateCoeffs();` a second time to use another operator. However, by running updateCoeffs() a flag (updated_) is set in a private member function that prevents it from being run twice. Is there a more elegant way to run updateCoeffs() twice without copying pointPatchFields, renaming and then calling the same updateCoeffs() function with a different name to get around the updated_ flag? Thanks, Dan

 August 24, 2010, 22:52 #3 Senior Member   Sandeep Menon Join Date: Mar 2009 Location: Amherst, MA Posts: 390 Rep Power: 16 Are you trying to simulate a multi-element wing situation? That's what I gather from your initial post. Could you post a picture of your mesh? __________________ Sandeep Menon University of Massachusetts Amherst https://github.com/smenon

August 26, 2010, 18:52
#4
Senior Member

Daniel
Join Date: Jul 2009
Posts: 154
Rep Power: 9
Hello Sandeep,

Thank you for your reply - yes, it is a multi-element wing. I have posted two images, one of the wing and flap oscillating together (you will notice a small gap between the wing and the flap) and a close-up of the flap when I cause it to oscillate in the opposite direction using modified angularOscillatingDisplacement code (it looks like the flap boundary was moved, but the rest of the mesh was not adjusted). The mesh is a structured C-grid, and not nearly optimized. I just want to get the motion to work at this point.

The problem is that I have so far been unable to perform the two transformations required to cause the flap to oscillating while the "hinge" remains immobile relative to the wing. I must perform either 1) the same rotation as the wing followed by a second rotation about the center of the hinge, or 2) a displacement of the flap to the correct location relative to the rotating wing followed by a rotation about the center of the hinge. Do you have any suggestions? The code I am using, which does not work, is as follows:

Code:
```void flapDisplacementPointPatchVectorField::updateCoeffs()
{
if (this->updated())
{
return;
}

const polyMesh& mesh = this->dimensionedInternalField().mesh()();
const Time& t = mesh.time();

scalar angle = angle0_ + amplitude_*sin(omega_*t.value());
vector axisHat = axis_/mag(axis_);
vectorField p0Rel = p0_ - origin_;

vectorField::operator=
(
p0Rel*(cos(angle) - 1)
+ (axisHat ^ p0Rel*sin(angle))
+ (axisHat & p0Rel)*(1 - cos(angle))*axisHat
);

fixedValuePointPatchField<vector>::updateCoeffs();

//new
scalar fangle = fangle0_ + famplitude_*sin(fomega_*t.value());//
vector faxisHat = faxis_/mag(faxis_);
vectorField fp0Rel = p0_ - forigin_;//need reload p0?

vectorField::operator=
(
fp0Rel*(cos(fangle) - 1)
+ (faxisHat ^ fp0Rel*sin(fangle))
+ (faxisHat & fp0Rel)*(1 - cos(fangle))*faxisHat
);
//updated_ = false; // ref pointPatchField.H --- This causes an error
//fixedValuePointPatchField<vector>::updateCoeffs(); //this has no effect
// end new
}```
I renamed angularOscillatingDisplacement to flapDisplacement, and placed an "f" in front of the dictionary parameters that are to affect the flap oscillation.

Thanks,

Dan
Attached Images
 MoveAsOne.jpg (97.2 KB, 38 views) OppositeOscillation.jpg (97.3 KB, 40 views)

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

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

 Contact Us - CFD Online - Top