|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Gareth
Join Date: Apr 2010
Location: Sydney Aus
Posts: 14
Rep Power: 17 ![]() |
Hello everyone,
I am trying to use perturbU to run a precursor simulation for a channel flow, so that I get the required turbulence before I can use the results to initialise a main run. I received the following error while compiling perturbU: perturbU.C: In function ‘int main(int, char**)’: perturbU.C:173:49: error: ‘class Foam::Random’ has no member named ‘GaussNormal’ scalar deviation=1.0 + 0.2*perturbation.GaussNormal(); I am using Openfoam 6. Thanks, Gary |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Abhishek Mukherjee
Join Date: Nov 2018
Posts: 6
Rep Power: 9 ![]() |
Hi, I am also facing the same issue, my OpenFoam version 6.0 and while compiling perturbU, I am getting same error
error: ‘class Foam::Random’ has no member named ‘GaussNormal’; did you mean ‘scalarNormal’? scalar deviation=1.0 + 0.2*perturbation.GaussNormal(); |
|
|
|
|
|
|
|
|
#3 |
|
New Member
Erik
Join Date: Sep 2019
Posts: 4
Rep Power: 8 ![]() |
For future users: I was able to solve this issue in OF7.0 by changing GaussNormal to scalarNormal in perturbUChannel/perturbU.C and perturbUGeneric/perturbU.C.
After trying to compile another error comes up indicating that headerOk is not a member etc in perturbUCylinder/perturbU.C. This can be fixed by borrowing from $FOAM_SRC/conversion/meshTables/boundaryRegion.C where IOMap<dictionary> ioObj is defined. Simply change the definition in the perturbU.C file from previously Code:
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
);
Code:
IOMap<dictionary> ioObj
(
IOobject Uheader
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ
)
);
Maybe this could be updated in the git repository for more recent OF versions? |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Gerry Kan
Join Date: May 2016
Posts: 383
Rep Power: 12 ![]() |
As the compiler error suggests, Foam::Random’ no longer has a member function ‘GaussNormal’ from OF 6 onwards. The new member 'scalarNormal' also returns a random scalar between 0 and 1. It is sufficient to substitute the offending member with this renamed member and not significantly alter the behavior of perturbU.
Gerry. |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting error both interpreting and compiling | serene6390 | Fluent UDF and Scheme Programming | 1 | October 27, 2017 01:49 |
| All files present. but solver not compiling | saddy | OpenFOAM Programming & Development | 1 | July 29, 2017 10:50 |
| [OpenFOAM.org] Trouble Compiling OpenFOAM-dev using Intel Compiler 15 for use on Xeon Phi | foamer123 | OpenFOAM Installation | 9 | August 20, 2015 15:03 |
| is PerturbU there in OpenFOAM 2.1? | turbfoam | OpenFOAM Running, Solving & CFD | 3 | December 26, 2012 16:18 |
| Help with KIVA4 source code compiling | geothokar | Main CFD Forum | 0 | September 3, 2010 06:40 |