Closed SH-Liao closed 5 years ago
Hello Shenghai,
Read my reply on Issue #26 . It will explain how to set-up the drivingData folder and couple your a windPlantSolver simulation to your precursor simulation.
Cheers, Bart
Hello ,@Bartdoekemeijer ,thanks for your help. I haven't start running yet becuase I want to learn a little more about example.ALM. Until now ,I think that turbine models are located in constant/turbineArrayProperties
turbine0 { turbineType "NREL5MWRef"; baseLocation (1000.0 1500.0 0.0); numBladePoints 40;
turbine1 { turbineType "NREL5MWRef"; baseLocation (1000.0 1500.0 0.0); numBladePoints 40;
so as far as I'm consider there are two turbines named turbine0 & turbine1, they have the same propreties ,but how could they be at the same location?
And what if I want to choose/change the airfoilProperties ? I saw the following in constant/NREL5MWRef
Airfoils
(
"Cylinder1"
"Cylinder2"
"DU40_A17"
"DU35_A17"
"DU30_A17"
"DU25_A17"
"DU21_A17"
"NACA64_A17"
);
I cannot figure out where it was defined, would you mine send me some help.
yours ShenghaiLiao
You are correct in that it does not make sense for the turbines to be at the same baseLocation—this is case dependent and for you to set up.
The airfoils are defined in constant/airfoilProperties/*; their order in the Airfoils list defined in constant/turbineProperties/NREL5MWRef corresponds to the numerical airfoil ID in the last column of the BladeData list in the same file.
Hope this helps.
From: ShenghaiLiao notifications@github.com Reply-To: NREL/SOWFA reply@reply.github.com Date: Wednesday, March 20, 2019 at 3:53 AM To: NREL/SOWFA SOWFA@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [NREL/SOWFA] some questions in running example.ALM (#43)
Hello ,@Bartdoekemeijerhttps://github.com/Bartdoekemeijer ,thanks for your help. I haven't start running yet becuase I want to learn a little more about example.ALM. Until now ,I think that turbine models are located in constant/turbineArrayProperties
turbine0 { turbineType "NREL5MWRef"; baseLocation (1000.0 1500.0 0.0); numBladePoints 40;
turbine1 { turbineType "NREL5MWRef"; baseLocation (1000.0 1500.0 0.0); numBladePoints 40;
so as far as I'm consider there are two turbines named turbine0 & turbine1, they have the same propreties ,but how could they be at the same location?
And what if I want to choose/change the airfoilProperties ? I saw the following in constant/NREL5MWRef
Airfoils ( "Cylinder1" "Cylinder2" "DU40_A17" "DU35_A17" "DU30_A17" "DU25_A17" "DU21_A17" "NACA64_A17" );
I cannot figure out where it was defined, would you mine send me some help.
yours ShenghaiLiao
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/NREL/SOWFA/issues/43#issuecomment-474760394, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARa7swZBK-aWASHoAzOVwkQTV6qp6_GVks5vYgUPgaJpZM4b0COw.
hello ,thanks for the both of you @ewquon @Bartdoekemeijer ,that's really helpful. Today , I run example.ABL.flatTerrain.stable to create a precursor ,in order to save some time ,I changed some data in setUp :first I change the field to 300x300x100 (with Mesh 30x30x10)as a test ,and it provided a good turbulence.Then next i tried 300x300x200(with Mesh 30x30x20) and 600x600x200(with Mesh 60x60x20),but the conclusions which came out are likely to be wrong .In paraview ,it seems that the turbulence only appears at the bottom ,about 100 meters . So I went back to run the original edition, it came the same ,the turbulence only appears at low atitude about z<100.Not look like tutorial in which turbulene is full of the whole field. And then I saw these in the setUp
// Initial values for the variables. // Note that U and T get overwritten if setFieldsABL is called. U0Mag 8.0; // Initial condition for wind speed (m/s). dir 270.0; // Initial condition for wind direction (deg). windHeight 99.27; // Height at which to drive mean wind to U0Mag/dir (m). p_rgh0 0.0;
the windHeight is only 99.27m,the tubine is 87.6 meters high with radiius 63 meters
In total ,is this output capable to be a"precursor" or I should change some parameters,I'm going to use it to run example.ALM
Hi @ShenghaiLiao ,
In theory, you could use any kind of precursor as an inflow to your wind farm simulation. I guess the question becomes "how realistic is my precursor simulation", which is a big topic on itself. I am by no means an expert, but in my experience, wind farm simulations are typically done in domains much larger than the wind farm itself, I assume to reduce boundary effects. Hence, a precursor is generally also much larger than the wind farm. This is why the example precursor simulation is of a 3km x 3km x 1km domain. A domain of 600m x 600m x 200m seems very small. I am not sure why your turbulence levels seem so off on this small domain, though. I have had success with smaller precursor domains myself (e.g., a 2km x 1km x 650m domain sampled at 200 x 100 x 65 cells). You might want to try a slightly larger domain.
Furthermore, please note that in the windPlantSolver.ALM simulation, you will need to further refine the mesh near the rotor for accurate results, yielding even more cells. Perhaps to avoid these boundaryData issues, you could consider running a pisoFoamTurbine.ADM or pisoFoamTurbine.ALM simulation. In contrary to windPlantSolver, pisoFoamTurbine does not require a precursor simulation and assumes a uniform inflow. This might be easier to start out with. Furthermore, the ADM code works pretty well without further refining the mesh.
Cheers, Bart
@ShenghaiLiao ,
A few comments:
Eliot
Thanks again for both of you @ewquon @Bartdoekemeijer,I have successfully run example.ALM here are some experience and advices: first : [0] [0] [0] --> FOAM FATAL IO ERROR: [0] Illegal dictionary entry or environment variable name "meanStartTime" Valid dictionary entries are ..
then I went to "setUp" at line34:AvgStartTime 20200; // Time to begin accumulating the mean; Should it be "meanStartTime",this error vanished after I made the change.
second: Starting time loop
at line34:AvgStartTime 20200; // Time to begin accumulating the mean; Should it be "meanStartTime",this error vanished after I made the change.
Yes, correct
I checked $precursorDir/drivingData/west and find the values start at 20000.7173601,so I created a floder name "20000",and just copied the contents form "20000.7173601" and the error disappeared,
This is how it is fixed in practice, too. Indeed, perhaps a fix can be made in the makeBoundaryDataFiles scripts!
At last ,What are those in floder example.ALM/turbineOutput/20000,they can not be open by paraview,could them be postProcessing?
This folder contains the full state information of your simulation. This is in binary OpenFOAM format. You need to convert it to readable format if you would like to open it in ParaView. Take a look at the FoamToVTK
function.
Hope this helps!
Best regards, Bart
Dear Bart Doekemeijer,
I am sorry that I am placing question in this closed discussion.
I am going to run example.ALM based on the precursors made from "example.ABL.flatTerrain.stable". I am trying to make precursorDir according to your instruction in #26. However I am getting error in executing:
reconstructPar -time 20000 -fields '(k kappat nuSgs p_rgh qwall Rwall T U)'
as:
Reconstructing fields for mesh region0
Time = 1000
Reconstructing FV fields
Reconstructing volScalarFields
nuSgs
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigSegv::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::fixedValueFvPatchField<double>::fixedValueFvPatchField(Foam::fixedValueFvPatchField<double> const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&) at ??:?
#4 Foam::fvPatchField<double>::addpatchMapperConstructorToTable<Foam::fixedValueFvPatchField<double> >::New(Foam::fvPatchField<double> const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::fvPatchFieldMapper const&) at ??:?
#5 ? at ??:?
#6 ? at ??:?
#7 ? at ??:?
#8 ? at ??:?
#9 ? at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? at ??:?
Could you please let me know, if you have any idea about the source of error?
Thanks a lot.
Best regards,
Hosein
Hosein,
The problem you are having is with the reconstructPar
utility, which is a standard OpenFOAM utility, rather than a SOWFA utility. Placing your non-SOWFA question on a closed two-year-old SOWFA issue is not the way to get help.
In any case, note that even though you asked for time 20000, it is attempting to reconstruct time 1000. Check if you have times 1000 and 20000, and check if the variable that is giving you issues actually exists.
Good luck.
hello, I was trying to run "Example.ALM", and I fellow the suggestions provided by https://github.com/NREL/SOWFA/issues/26 I succeed to run "example.ABL.flatTerrain.stable" (the field:3km3km01.02km,endTime:5000s),then continued simulation to 7000s, and I got the "boundaryDataPre". Next , I used boundaryDataConversion and sourceDataConversion to create boundaryData for 2000s and sources. I checked the boundarydata folder, every time folder contain "K","T","U". But the average are all 0. Is there any problem?
After that I put them in drivingData and reconstructPar, got 500:5000(10 folders). Is that right to create the precursor data? Then I fellow the hint given by @SH-Liao changed the "meanStartTIme", add 5000 in $precursorDir/drivingData/south and changed application to windPlantSolver.ALM in controlDict. Then I got the error when I simulate:
Starting time loop
I checked the boundarydata folder, every time folder contain "K","T","U". But the average are all 0. Is there any problem?
The average value is not used as mentioned here in #26. So you can ignore that.
The files in your boundaryData
directory are however not populated (i.e., there is no data in between the parentheses after 0
). Ideally The files should look something like this (example for k
):
FoamFile
{
version 2.0;
format ascii;
class scalarAverageField;
object values;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Average
0
30000
(
0.0273590000799
0.0233944500754
.
.
.
)
Are the same files at the locations postProcessing/boundaryDataPre/<time>/west/scalarField/
and postProcessing/boundaryDataPre/<time>/west/vectorField/
populated? If yes, then check for errors when you do the data conversion in Steps 5 and 6 of #26.
Just from the data you've provided, it is difficult to say why it might be happening but see if you exactly followed the steps as given in #26. Also, as you've changed the simulation times, see if the startTime
, endTime
, etc. are correctly set in your controlDict.1
and controlDict.2
.
Having said that, you can also think of following the same initial run-time of 20000 s as the time span of 5000 s is not long enough to reach a quasi-equilibrium state.
I checked the boundarydata folder, every time folder contain "K","T","U". But the average are all 0. Is there any problem?
The average value is not used as mentioned here in #26. So you can ignore that. The files in your
boundaryData
directory are however not populated (i.e., there is no data in between the parentheses after0
). Ideally The files should look something like this (example fork
):FoamFile { version 2.0; format ascii; class scalarAverageField; object values; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Average 0 30000 ( 0.0273590000799 0.0233944500754 . . . )
Are the same files at the locations
postProcessing/boundaryDataPre/<time>/west/scalarField/
andpostProcessing/boundaryDataPre/<time>/west/vectorField/
populated? If yes, then check for errors when you do the data conversion in Steps 5 and 6 of #26.Just from the data you've provided, it is difficult to say why it might be happening but see if you exactly followed the steps as given in #26. Also, as you've changed the simulation times, see if the
startTime
,endTime
, etc. are correctly set in yourcontrolDict.1
andcontrolDict.2
.Having said that, you can also think of following the same initial run-time of 20000 s as the time span of 5000 s is not long enough to reach a quasi-equilibrium state.
Thank you! Maybe it caused the error.
This first time I fellow thehttps://github.com/NREL/SOWFA/issues/26 I try to create a controlDict.2, but it did not work, like the controlDict did not change. So I have to change the data in controlDict.1 ,and continued run runscript.solve.1
with
cp system/controlDict.1 system/controlDic
t
Maybe it caused the problem.And could you teach me how to set the controlDict.2 to make it run? Thank you!
And the thing about run-time, I know it's not enough to get a good output. At this moment I only consider letting the program run normally!
Thank you for your reply!
@Cookiewyf Okay, this explains the source of error. So, once you have finished the initial run (upto 5000 s or 20000 s as mentioned in #26), your next step should be to create a new controlDict.2
file by copying controlDict.1
and making the changes as mentioned in #26. Now, in order to use this new controlDict
file, you MUST set runNumber=2
in the file runscript.solve.1
(or you can create a new runscript.solve.2
file for consistency).
You can see the if
clause here: https://github.com/NREL/SOWFA/blob/103832ebbae07b62220858a1e3da4b5e7d6375bd/exampleCases/example.ABL.flatTerrain.stable/runscript.solve.1#L27
When you were launching the script runscript.solve.1
to generate the precursor data without changing the runNumber
, the initializer
was overwriting the simulation data created in the first run.
hello,I had run "example.ABL.flatTerrain.stable" yet ,and got the inflow velocity and temperature data which are contained by folder"20000".(which looks nice in paraview) So I turned to example.ALM,when I open the "runscript.preprocess",at line 16 "precursorDir=/projects/precursor/neutral3x3",that's not the same path as mine. Then I saw command "#cp -rf $precursorDir/$startTime $startTime & cp -rf $precursorDir/constant/polyMesh ./constant",and I guess it may be the path to "example.ABL.flatTerrain.stable". But I cannot find out the following: Get the inflow data linked up.
ln -s $precursorDir/drivingData/boundaryData ./constant
Get the driving source terms linked up.
ln -s $precursorDir/drivingData/sources ./constant
becuase there are no such file or directory in "example.ABL.flatTerrain.stable",then I searched my computer and find out there is no directory name "drivingData" .
What am I missing ? I would be very grateful if someone could help me.