turbinesFoam / turbinesFoam

Actuator line modeling extension library for OpenFOAM.
Other
112 stars 61 forks source link

Error at a turbine element in multiRe run #254

Open hcOnel opened 6 years ago

hcOnel commented 6 years ago

Hello, I am getting the following error when I run a multiRe solution. My profile data files are all similar, it has no problems up to 6th element.

Changing velocity of turbine1.blade2.element5 from (0 0 0) to (0 13.0557142857 -22.613160472)

Creating actuatorLineElement: turbine1.blade2.element6
Geometry segment index: 6
Position: (0 -24.3786151166 -14.075)
Chord length: 4.00275
Chord direction (before pitching): (0 0.5 -0.866025403784)
Pitch (degrees): -7.78625
Span length: 4.09999999999
Span direction: (0 -0.866025403784 -0.5)
Profile name index: 6
Profile name: DU91W2250LM
writePerf: 0
Root distance (nondimensional): 0.433333333334
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::profileData::interpolate(double, Foam::List<double>&, Foam::List<double>&) at ??:?
#4  Foam::profileData::calcZeroLiftAngleOfAttack() at ??:?
#5  Foam::profileData::analyze() at ??:?
#6  Foam::profileData::analyzeMultiRe() at ??:?
#7  Foam::profileData::readMultiRe() at ??:?
#8  Foam::profileData::profileData(Foam::word const&, Foam::dictionary const&, int const&) at ??:?
#9  Foam::fv::actuatorLineElement::actuatorLineElement(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#10  Foam::fv::actuatorLineSource::createElements() at ??:?
#11  Foam::fv::actuatorLineSource::actuatorLineSource(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#12  Foam::fv::axialFlowTurbineALSource::createBlades() at ??:?
#13  Foam::fv::axialFlowTurbineALSource::axialFlowTurbineALSource(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#14  Foam::fv::option::adddictionaryConstructorToTable<Foam::fv::axialFlowTurbineALSource>::New(Foam::word const&, Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#15  Foam::fv::option::New(Foam::word const&, Foam::dictionary const&, Foam::fvMesh const&) at ??:?
#16  Foam::fv::optionList::reset(Foam::dictionary const&) at ??:?
#17  Foam::fv::optionList::optionList(Foam::fvMesh const&, Foam::dictionary const&) at ??:?
#18  Foam::fv::options::options(Foam::fvMesh const&) at ??:?
#19  Foam::fv::options::New(Foam::fvMesh const&) at ??:?
#20  ? at ??:?
#21  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#22  ? at ??:?
Floating point exception (core dumped)

The thing is, I encounter no problems when I decrease the overall mesh resolution to half (writePerf switches between 1 and 0). What might it be related to?

petebachant commented 6 years ago

It looks like the interpolation to find the zero lift angle of attack is dividing by zero.

Also, what do you mean by writePerf switching to zero when you halve the mesh resolution? Does that happen without changing any config files?

hcOnel commented 6 years ago

I was almost sure that writePref changed by itself, but I've run it now for two different mesh resolutions and it did not. I guess my bad, sorry. Other than that, I have compared the two pimpleFoam log files after changing ONLY the mesh size, and the following is the only difference other than the point where fine mesh returns the error.

COARSE MESH:

Selecting finite volume options model type axialFlowTurbineALSource
    Source: turbine1
    - selecting cells using cellSet turbine1
    - selected 1224 cell(s) with volume 186587.307204
.......................

FINE MESH:

Selecting finite volume options model type axialFlowTurbineALSource
    Source: turbine1
    - selecting cells using cellSet turbine1
    - selected 8872 cell(s) with volume 142685.557145
.......................

Yet still I do not understand what does interpolation to find the zero lift angle of attack has to do with mesh size, is not it related to the cl cd data of the airfoil?

Also here are the two log files.

log.pimpleFoam.fine.txt log.pimpleFoam.coarse.txt

petebachant commented 6 years ago

I've been reading through your logs and the source code and I'm a bit stumped. One thing that may be good to do is use interpUtils::interp1D instead of the profileData::interpolate method to get the zero lift angle of attack.

Something else I noticed is that your Reynolds numbers don't appear to be ascending:

( 62000 94000 125000 188000 250000 375000 500000 750000 1000000 1500000 12000000 16000000 2000000 20000000 24000000 3000000 32000000 4000000 6000000 8000000 );

That is, you have 4e6 showing up in the list after 12e6, and so on.