|
[Sponsors] |
May 22, 2015, 15:40 |
Error using R utility
|
#1 |
Member
Join Date: Nov 2009
Posts: 56
Rep Power: 17 |
Hello,
When I try to obtain the modelled Reynolds Stress tensor by using the R utility I get the following message Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Time = 0 Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting turbulence model type RASModel Selecting RAS turbulence model LaunderSharmaKE LaunderSharmaKECoeffs { Cmu 0.09; C1 1.44; C2 1.92; sigmaEps 1.3; } Writing R field --> FOAM FATAL ERROR: object of type N4Foam9DataEntryINS_10SymmTensorIdEEEE is not allocated From function Foam::autoPtr<T>::operator->() in file /home/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/autoPtrI.H at line 176. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 Foam::timeVaryingMappedFixedValueFvPatchField<Foam::SymmTensor<double> >::write(Foam::Ostream&) const at ??:? #3 Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::writeEntry(Foam::word const&, Foam::Ostream&) const at ??:? #4 Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::writeData(Foam::Ostream&) const at ??:? #5 Foam::regIOobject::writeObject(Foam::IOstream::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const at ??:? #6 at ??:? #7 at ??:? #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 at ??:? Aborted (core dumped) In particular, does anybody know what this means: object of type N4Foam9DataEntryINS_10SymmTensorIdEEEE is not allocated The R tensor is defined in LaunderSharmaKE.C |
|
February 3, 2016, 13:12 |
|
#2 |
New Member
Han Li
Join Date: Jul 2015
Location: College Station
Posts: 16
Rep Power: 11 |
I had the same issue. Anyone know the reason?
|
|
February 3, 2016, 13:53 |
|
#3 |
Senior Member
|
Hi,
Though it would be great to have test case with the error, let's try to deduce the reason from backtrace. Error happened in Code:
Foam::timeVaryingMappedFixedValueFvPatchField<Foam::SymmTensor<double> >::write Technically the reason for the error is this part of timeVaryingMappedFixedValueFvPatchField.C (since offset_ is the only property of DataEntry type): Code:
template<class Type> void timeVaryingMappedFixedValueFvPatchField<Type>::write(Ostream& os) const { ... offset_->writeData(os); ... } Code:
if (offset_.valid()) { offset_->writeData(os); } |
|
February 4, 2016, 20:34 |
|
#4 |
New Member
Han Li
Join Date: Jul 2015
Location: College Station
Posts: 16
Rep Power: 11 |
According to the manager of Bug report website, the timeVaryingMappedFixedValue boundary condition could not use R utility.
"There is no automatic way to convert the timeVaryingMappedFixedValue BC for k into the equivalent for R. It would be possible to simply evaluate R for the current state of all the BCs and output them all as type "calculated" which would be OK for post-processing but not for changing from say a k-epsilon to an R-epsilon turbulence model." I tried this, it worked. Since I am doing steady state now, it is fine. But for transient problem it seems a little bit trouble to change every time step. |
|
March 21, 2016, 07:43 |
|
#5 |
Member
Join Date: Nov 2009
Posts: 56
Rep Power: 17 |
Could you explain to me in little more detail what you did to export the R stress tensor? I thought it was only a postprocessing utility explicitly calculating Reynolds stresses using my eddy viscosity and velocity gradients. Why is the problem related to timeVaryingMappedFixedValue?
|
|
March 21, 2016, 12:43 |
|
#6 |
New Member
Han Li
Join Date: Jul 2015
Location: College Station
Posts: 16
Rep Power: 11 |
Yes, R is only a postprocessing utility. However, based on my understanding, R utility is not compatible with boundary condition "timeVaryingMappedFixedValue". So, what I did was after my calculation is done, I modify the file of the time step that I am going to postprocess, e.g. 1000, I change the U and other vaiables that was "timeVaryingMappedFixedValue" to "calculated". Then R utility will be able to to the job.
|
|
March 21, 2016, 20:00 |
|
#7 |
Member
Join Date: Nov 2009
Posts: 56
Rep Power: 17 |
Ahh OK, I get it. Thanks for that info. But I am still little bit confused why it is not working for timeVaryingMappedFixedValue since all variables are known for computing the R tensor
|
|
March 23, 2016, 21:38 |
|
#8 |
New Member
Han Li
Join Date: Jul 2015
Location: College Station
Posts: 16
Rep Power: 11 |
I guess it is some bug in the utility or the boundary condition, but I am not capable to find out and fix. :P
|
|
January 9, 2017, 10:23 |
|
#9 |
New Member
DimitriF
Join Date: Dec 2016
Location: London
Posts: 19
Rep Power: 10 |
Hey Han Li,
I have now the same issue and cannot make it work. I changed inlet { type timeVaryingMappedFixedValue; setAverage 0; offset constant 0; value nonuniform List<scalar> to inlet { type calculated; value nonuniform List<scalar> but it doesn't work. Can you tell me what you changed in detail please? UPDATE: I use the kOmegaSST model and adding the k,omega and U files enables the calculation of the Reynolds stress. Thank you so much for providing the solution!! Dimitri |
|
January 9, 2017, 20:30 |
|
#10 |
New Member
Han Li
Join Date: Jul 2015
Location: College Station
Posts: 16
Rep Power: 11 |
Did you change to calculated to all files?
All I did is replace the string "timeVaryingMappedFixedValue" to "calculated" for all variables. For my case U, epsilon and k. Also, the version I used is OpenFOAM 2.4 |
|
January 10, 2017, 07:24 |
|
#11 |
New Member
DimitriF
Join Date: Dec 2016
Location: London
Posts: 19
Rep Power: 10 |
I did the same as you mention, changing only U, epsilon and k to calculated and deleted the setAverage and the offset lines. The delete of the setAverage and offset lines shouldn't make a difference since there are not taken into account by the type calculated, I believe.
Thanks again, you saved me!! :-) |
|
June 17, 2022, 20:39 |
Janaf Temperature Out of Range
|
#12 |
New Member
Elhaddad
Join Date: Jun 2012
Posts: 7
Rep Power: 14 |
I am sure the solution to janaf temperature problem is in the mesh. A structured simple mesh using only scripting is the only solution.
I have prepared this procedure to get a good mesh. After gmshtofoam just prepare the bondary file to fit and run checkfoam. Pls check the attached file! Last edited by AhmedSamy; June 19, 2022 at 08:31. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
[mesh manipulation] mirrorMesh utility preserving regions | zfaraday | OpenFOAM Meshing & Mesh Conversion | 1 | November 7, 2016 22:51 |
Something doens't work with wallHeatFlux utility or externalWallHeatFluxTemperat BC!! | zfaraday | OpenFOAM Post-Processing | 0 | February 5, 2015 17:47 |
turbDyMFoam and refineMesh utility | fusij | OpenFOAM | 6 | December 12, 2011 10:39 |
StreamFunction utility | titio | OpenFOAM Post-Processing | 0 | May 19, 2010 17:04 |