|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 15 ![]() |
I'm trying to run pimpleDyMFoam with a pointDisplacement file (like the wingMotion tutorial). The code below runs, but I'm not really sure about what exactly it's doing.
value - not sure why this is needed, but it is axis (0 0 1) - no problem here, rotating about the z-axis origin (0 0 0) - no problem here, rotating about the z-axis through point (0 0 0) I expect that the last three are related as angle = angle0 + amplitude * sin(2*pi*omega*t) Is this relationship correct? Are angle0 and amplitude expressed in degrees? Is omega expressed in Hz? Is there a 2pi factor in the sine function? Code:
airfoil { type angularOscillatingDisplacement; value uniform (0 0 0); axis (0 0 1); origin (0 0 0); angle0 0; amplitude 10; omega 0.174; } |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 15 ![]() |
Working to the following code:
Code:
airfoil { type angularOscillatingDisplacement; axis (0 0 1); origin (-1 0 0); angle0 0; amplitude 5; omega 0.3183098862; value uniform (0 0 0); } ![]() This means that angularOscillatingDisplacement isn't doing anything close to what I think it's doing. Searching........................... A bit from oscillatingRotatingMotion.C: Code:
Foam::septernion Foam::solidBodyMotionFunctions::oscillatingRotatingMotion:: transformation() const { scalar t = time_.value(); vector eulerAngles = amplitude_*sin(omega_*t); // Convert the rotational motion from deg to rad eulerAngles *= pi/180.0; quaternion R(eulerAngles.x(), eulerAngles.y(), eulerAngles.z()); septernion TR(septernion(CofG_)*R*septernion(-CofG_)); Info<< "solidBodyMotionFunctions::oscillatingRotatingMotion::" << "transformation(): " << "Time = " << t << " transformation: " << TR << endl; return TR; } Okay so I'm a bit lost now. Can anyone explain how angularOscillatingDispalcment works? |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 ![]() |
Howdy,
A good place to start might be reverse engineering the source code. The file of interest is located here in 1.6-ext: Code:
~/OpenFOAM/OpenFOAM-1.6-ext/src/dynamicMesh/meshMotion/fvMotionSolver/pointPatchFields/derived/angularOscillatingDisplacement/angularOscillatingDisplacementPointPatchVectorField.C |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Member
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 15 ![]() |
Quote:
Ah, apparently I was looking at the wrong source code. Thanks for pointing me in the right direction! |
||
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 ![]() |
It can be easy to get pretty lost down in the depths of the boundary condition directory structures.
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 15 ![]() |
This looks like the subroutine that does the actual rotating:
Code:
void angularOscillatingDisplacementPointPatchVectorField::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(); } |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Joe
Join Date: Dec 2011
Location: Groton, CT
Posts: 69
Rep Power: 15 ![]() |
Yep, everything is in radians or radians/second.
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
|
Hello all
i wanna use linear motion vs time to calculate aerodynamic coeffs for angle of attack=0 to 25 degrees of an airfoil. for this, i added "t.value()" to the oscillation function as following : angle = angle0_ + amplitude_*sin(omega_*t.value())+ t.value(); by substituting angle0=0 and amplitude=0 in it. now: 1- would you tell me the steps of how to compile the new modified code?! 2- did you have another suggestion for solving this problem? tnx alot ____________ Rasoul Last edited by desert_1250; June 23, 2012 at 06:23. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
|
Hello again
i compiled the new code successfully using wmake libso command and it is up to date. but when i used it in the 0 > poitDisplacement file, the following error apear : unknown patchField type myAngularOscillatingDisplacement for patch type wall... the boundary type that i used is : wing { type myAngularOscillatingDisplacement; axis (0 0 1); origin (0 0 0); amplitude 0; omega 6.283; value uniform (0 0 0); } Can anyone tell me how to solve this problem? tnx _____ Rasoul |
|
![]() |
![]() |
![]() |
![]() |
#10 | |
New Member
Chayanit Nigaltia
Join Date: Jan 2018
Posts: 29
Rep Power: 9 ![]() |
Quote:
I am facing problem running this case.The following problem is occuring . GAMG: Solving for cellDisplacementx, Initial residual = 1, Final residual = 9.00145e-06, No Iterations 3 GAMG: Solving for cellDisplacementy, Initial residual = 1, Final residual = 7.73384e-06, No Iterations 3 GAMG: Solving for pcorr, Initial residual = 1, Final residual = 0.0147208, No Iterations 16 time step continuity errors : sum local = 1.33772e-05, global = 5.47826e-20, cumulative = 5.47826e-20 PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0342088, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.028379, No Iterations 1 #0 Foam::error: ![]() #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:? #4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:? #5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) at ??:? #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:? #8 ? at ??:? #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #10 ? at ??:? Floating point exception (core dumped) Kindly help |
||
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
Jianming
Join Date: Dec 2016
Posts: 3
Rep Power: 10 ![]() |
Hi Chayanit,
I have the same issue as you faced, have you figured out this issue? In my case, when this issue happens, the forces on the airfoil became extremely large. Do you also have this issue? Thanks, Jim |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 418
Rep Power: 20 ![]() |
Hi,
I tried and realised that amplitude should be in rad, not degrees. I checked the latest 1912 source code and there seems to be a conversion, so not sure if we're looking at the correct file. Code:
wing { type angularOscillatingDisplacement; value uniform (0 0 0); axis (0 0 1); origin (0.25 0.007 0.125); angle0 0; amplitude 0.358; //units of rad ~ 20deg omega 6.28; //units of rad/s ~ 1 period /s moveDynamicMesh -noFunctionObjects to test and preview the mesh motion in Paraview before actually computing the solution. Can also be done in parallel. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get Pro/E Parameters to Show Up | Trues | CFX | 4 | September 17, 2012 20:26 |
Parameters for multigrid solver | HaZe | OpenFOAM Running, Solving & CFD | 3 | January 28, 2012 02:05 |
twoPhaseEulerFoam - parameters | grjmell | OpenFOAM | 1 | June 16, 2011 08:13 |
units of geometrical parameters lost | SoobY | ANSYS Meshing & Geometry | 2 | January 10, 2011 03:58 |
New to CFX-need explanations about mesh parameters | Cyril | CFX | 3 | November 24, 2006 06:33 |