|
[Sponsors] |
[Other] Oscillating Airfoil and Independently Oscillating Flap |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 24, 2010, 21:07 |
Oscillating Airfoil and Independently Oscillating Flap
|
#1 |
Senior Member
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17 |
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 ); Unfortunately, I cannot figure out how to modify the code to do either. Can anyone offer some guidance? Thank you, Dan |
|
August 24, 2010, 22:16 |
Some Progress...
|
#2 |
Senior Member
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17 |
It looks like it would work if I could call
Code:
fixedValuePointPatchField<vector>::updateCoeffs(); 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, 23:52 |
|
#3 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
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?
|
|
August 26, 2010, 19:52 |
|
#4 |
Senior Member
Daniel
Join Date: Jul 2009
Location: Montreal, Canada
Posts: 156
Rep Power: 17 |
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 } Thanks, Dan |
|
|
|