Hi all,
I´m intending to do s
Hi all,
I´m intending to do some turbomachinery calculations. For that simulations I´m looking for an appropriate outlet boundary condition for the pressure. I´m looking for an alternative to the fixedValue condition. I know something like a "mean pressure condition" for that kind of problem. Is something like that available in OpenFOAM? Any other suggestions are welcome too. Rolando |
Yeah, I know what you mean. I
Yeah, I know what you mean. I have implemented fixedMeanValue a while back and it behaves much better than "simple" fixed value. You can find it in the dev-version SVN:
fixedMeanValue boundary condition The setup is straightforward: just add type fixedMeanValue; meanValue 3.3; or similar. Enjoy, Hrv |
Thanks a lot Hrvoje,
it seems
Thanks a lot Hrvoje,
it seems to be what I am looking for. Rolando |
Hrv, what exactly is the advan
Hrv, what exactly is the advantage when we use this 'fixedMeanValue' B/C instead of a constant static pressure at the outlet?
Thanks! |
The advantage of fixedMeanValu
The advantage of fixedMeanValue boundary condition is a much smaller flow distortion on the boundary. Basically, you get the same behaviour as the fixed pressure outlter, but the local variation next to the boundary around the prescribed mean is picked up from the cells next to it.
If you want to see the effect, try any flow with the vortices leaving the domain through a pressure boundary, a stratified flow or something similar. I now use fixed mean pressure almost exclusively in "real life" runs. Enjoy, Hrv |
Thanks Hrv. I check the differ
Thanks Hrv. I check the difference in my vortex shedding simulations and get back to you.
|
Hi Hrv,
I added the fixedMe
Hi Hrv,
I added the fixedMeanValue folder from the svn repo onto my OF 1.4.1 installation and rebuilt libfiniteVolume.so. It went without any problems. However, when ever I try to use the B/C, I get this error: --> FOAM FATAL ERROR : gradientInternalCoeffs cannot be called for a defaultFvPatchField (actual type fixedMeanValue) on patch poutlet of field p in file "/home/madhavan/square_cylinder/re1002d_refined_fmvbc/0/p" You are probably trying to solve for a field with a default boundary condition. From function defaultFvPatchField<type>::gradientInternalCoeffs( ) const in file fields/fvPatchFields/basic/default/defaultFvPatchField.C at line 694. FOAM exiting Is there something else that I need to build? |
You didn't rebuild it properly
You didn't rebuild it properly or you mis-spelled the name - the code picks up the default patch field instead.
Edit the ~/.OpenFOAM-1.4.1-dev/controlDict and set: disallowDefaultFvPatchField 1; If the code fails, it will give you the list of available patch fields. fixedMeanValue should be on the list and it probably isn't. For the record, you should have the following entry in Make/files: $(derivedFvPatchFields)/fixedMeanValue/fixedMeanValueFvPatchFields.C Also, check that the file actually compiled - touch it and try again. Then check you are picking up the right library... etc etc. Hrv |
Problem solved! Thanks a lot H
Problem solved! Thanks a lot Hrv. I added the entry in Make/files and did a wmake libso finiteVolume and all was well http://www.cfd-online.com/OpenFOAM_D...part/happy.gif
|
Question
Hi
1-I did copy the files in this directory: /home/sf/OpenFOAM/sf-1.5/applications/fixedMeanValue 2-then I did: [sf@ls55cb1028 fixedMeanValue]$ wmakeFilesAndOptions wmakeFilesAndOptions: Creating files wmakeFilesAndOptions: Creating options 3- this happend: wmake SOURCE=fixedMeanValueFvPatchField.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/sf/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/sf/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude -I/home/sf/OpenFOAM/OpenFOAM-1.5/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/fixedMeanValueFvPatchField.o fixedMeanValueFvPatchField.C:42: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&)â fixedMeanValueFvPatchField.C:42: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&)â previously declared here fixedMeanValueFvPatchField.C:57: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)â fixedMeanValueFvPatchField.C:57: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)â previously declared here fixedMeanValueFvPatchField.C:71: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)â fixedMeanValueFvPatchField.C:71: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)â previously declared here fixedMeanValueFvPatchField.C:96: error: redefinition of âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam::DimensionedField<Type, Foam::volMesh>&)â fixedMeanValueFvPatchField.C:96: error: âFoam::fixedMeanValueFvPatchField<Type>::fixedMean ValueFvPatchField(const Foam::fixedMeanValueFvPatchField<Type>&, const Foam::DimensionedField<Type, Foam::volMesh>&)â previously declared here fixedMeanValueFvPatchField.C:111: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::autoMap(co nst Foam::fvPatchFieldMapper&)â fixedMeanValueFvPatchField.C:111: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::autoMap(co nst Foam::fvPatchFieldMapper&)â previously declared here fixedMeanValueFvPatchField.C:123: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::rmap(const Foam::fvPatchField<Type>&, const Foam::labelList&)â fixedMeanValueFvPatchField.C:123: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::rmap(const Foam::fvPatchField<Type>&, const Foam::labelList&)â previously declared here fixedMeanValueFvPatchField.C:131: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::updateCoef fs()â fixedMeanValueFvPatchField.C:131: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::updateCoef fs()â previously declared here fixedMeanValueFvPatchField.C:155: error: redefinition of âvoid Foam::fixedMeanValueFvPatchField<Type>::write(Foam ::Ostream&) constâ fixedMeanValueFvPatchField.C:155: error: âvirtual void Foam::fixedMeanValueFvPatchField<Type>::write(Foam ::Ostream&) constâ previously declared here make: *** [Make/linux64GccDPOpt/fixedMeanValueFvPatchField.o] Error 1 Am I doing something wrong?? can anyone help me? |
Hi mcjicpm2,
i am getting the exact same error...just for fun I commented every definition but one...and he still brings me the error for just the ONE definition. I am using OF 1.6. .. Did you solve the Problem?? regards! |
Ok I just figured it out...
in files it needs to be: Code:
fixedMeanValueFvPatchFields.C The options file needs only: Code:
EXE_INC = \ Code:
libs ( "libfixedMeanValue.so" ) ; |
Hello,
I've seen that the boundary "fixedMeanValue" is available in OpenFOAM 1.5 (/src/finiteVolume/fields/fvPatchFields/derived/fixedMeanValue). However when I try to use it with the next set up ------------------------------ type fixedMeanValue; meanValue 100000; ------------------------------ the next message appear: ------------------------------ Cannot find 'value' entry on patch salida of field p in file "/... /0/p" which is required to set the values of the generic patch field. (Actual type fixedMeanValue) ------------------------------ Why does Openfoam demand 'value'? Is not enough with 'meanValue'? |
fixedMeanvalue adding code
hello to all,
Could you please tell me how to add the following code in the controldict file Code:
libs ( "libfixedMeanValue.so" ) ; Thanks |
how to calculate fixedMeanvalue
Hello to all,
Could you please tell me how to calculate the meanvalue in the below example. I am using this for outlet boundary condition for velocity. type fixedMeanValue; meanValue 3.3; Thanks to all. |
Outflow boundary condition
Hello to all
I'm a new user of OpenFoam and I'm looking for a boundary condition like outflow B.C like Fluent. Help me please. |
fixedMeanValue in 2.1.x?
1 Attachment(s)
Hello All,
I usually go back and forth between the ext and openCFD version of openfoam and I need to use the fixedMeanValue condition in the OpenCFD version. In earlier versions of 2.0.x I was able to compile the code provided above without any changes. However, now that my administrator has spent all this time getting 2.1.x set up on a small cluster...i cannot compile fixedMeanValue (not even on a recently updated version of 2.0.x). My errors are too long to include and are attached in a separate file. Thoughts? |
Hi to all,
i also need the fixedMeanValue bc in the regular OF version 2.1.0 ... i´ve read that this bc was available in former versions (eg 1.5). Is there a specific reason, why this kind of bc is´nt available any more? Eg in cfx the average static pressure bc is very common... |
Quote:
Code:
$FOAM_SRC/finiteVolume/fields/fvPatchFields/derived Code:
$(derivedFvPatchFields)/fixedMeanValue/fixedMeanValueFvPatchFields.C Code:
$(derivedFvPatchFields)/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C Code:
$FOAM_SRC/finiteVolume/Make/files |
Help fixedMeanValue Outlet
Hi guys,
I tried to implement fixedMeanValue at the outlet, and I get the followng error: file: /home/adam/OpenFOAM/adam-2.1.0/run/tutorials/incompressible/pimpleFoam/hvles/0/p::boundaryField::OUTLET from line 30 to line 32. From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&) in file /opt/openfoam210/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135. FOAM exiting Obviously even though I re-compiled after putting fixedMeanValue in the BCs it did not take. Help? Cheers: Adam |
Hi
you should type what is at line 30-32, to see what is wrong with it. |
Reply
OUTLET
{ type fixedMeanValue; meanValue 0; } Seems like it can't find the new fixedMeanValue BC. |
Don't forget to load the library in the system/controldict
If you did this already, check the terminal output for warnings. I don't recall the warning exactly but it's something like 'Warning: could not load library'... Cheers, L |
Reply
Hi Lieven,
It wouldn't load. It said the library could not be found. I followed the directuions to the letter. Is there anything else I have to do? Cheers: Adam |
It looks like you're install is in /opt and that looks like the Ubuntu package install. If so, it may be worthwhile to move to the git version of OpenFOAM and compile the whole thing yourself. Some good instructions are here. I think the ubuntu package is great if you want to quickly run things and get a feel for OpenFOAM, but if you are going to do more complicated stuff....i would move on and recompile it yourself. Its not very difficult at all and the link I provided will get you through no problem. Plus its fun :)
|
3 Attachment(s)
Hi Dan,
I downloaded two .C files for fixedMeanValue and one header file. See attached. When I run wmake libso finiteVolume I get the following errors....which file should be in my 'files' list.... Unfortunately I don't have time to recompile OpenFOAM. I would really appreciate your advice though. Cheers |
Errors
Here are the errors I get after trying to compile:
SOURCE=fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/fixedMeanValueFvPatchFields.o In file included from fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:29:0: fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.H:48:27: error: expected constructor, destructor, or type conversion before ‘(’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchScalarField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchScalarField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchScalarField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchScalarField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: warning: unused variable ‘Foam::debug’ [-Wunused-variable] fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchScalarField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchScalarField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchScalarField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchVectorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchVectorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchVectorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchVectorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: warning: unused variable ‘Foam::debug’ [-Wunused-variable] fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchVectorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchVectorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchVectorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSphericalTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSphericalTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSphericalTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSphericalTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: warning: unused variable ‘Foam::debug’ [-Wunused-variable] fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSphericalTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSphericalTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSphericalTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSymmTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSymmTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSymmTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSymmTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: warning: unused variable ‘Foam::debug’ [-Wunused-variable] fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSymmTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSymmTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchSymmTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchTensorField’ has not been declared fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: warning: unused variable ‘Foam::debug’ [-Wunused-variable] fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: ‘fixedMeanValueFvPatchTensorField’ was not declared in this scope fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: template argument 1 is invalid fields/fvPatchFields/derived/fixedMeanValue/fixedMeanValueFvPatchFields.C:40:1: error: invalid type in declaration before ‘;’ token make: *** [Make/linux64GccDPOpt/fixedMeanValueFvPatchFields.o] Error 1 |
2 Attachment(s)
Ok,
seems to me you're missing two files. You can find them in the attachment. Cheers, Lieven |
Thanks Lieven,
I put the files in the correct place, and I am recompiling now....hopefully it works. I really appreciate all of your help on this one. This type of BC should be a standard BC in OpenFOAM, it's much more stable. There is a reason commercial solvers usually implement this; you need robustness when working on real problems. Thanks again, Cheers: Adam |
Update
I tried to re-compile, but I get an error related to /platforms/linux64gcc/lib
It seems to have trouble compiling libFiniteVolume.so /opt/openfoam210/platforms/linux64GccDPOpt/lib/libfiniteVolume.so: file not recognized: File truncated collect2: ld returned 1 exit status make: *** [/opt/openfoam210/platforms/linux64GccDPOpt/lib/libfiniteVolume.so] Error 1 The rest of the compilation seemed to go well. Man, this is a struggle. Before you did an ./Allwmake, is there a clean command I need to use? I was just using a wmake on the finiteVolume lib. (wmake libso finiteVolume/) Cheers: Adam |
Do you have all the required packages to compile OpenFOAM? My previous suggestion contains a link to a page with instructions (here are the instructions). There they provide the packages:
Code:
sudo apt-get install build-essential flex bison cmake zlib1g-dev qt4-dev-tools libqt4-dev gnuplot libreadline-dev libncurses-dev libxt-dev Code:
wclean libso Code:
wmake libso Lastly, compiling really does not take any time at all. The instructions are really straightforward and If you do this while you are gone to lunch....if will be done by the time you get back. Over the last few years, OpenFOAM has really become much better at compiling with the set of provided instructions...extend and standard OpenFOAM alike. Good luck! |
Reply
Hi Dan,
Followed the instructions and got the same error. I can't figure out why the file would be truncated....it's like it got to large.. Cheers |
on the thread I provided, the problem was solved with the ubuntu package binutils-dev.
I will install the ubuntu package and try to install this myself the way you are doing it. |
Solved
I realized the other posts related to compiling the new BC in a local directory, whereas I compiled it in the /SRC directory. I simply removed the additional lines suggested by the OPs in the /files and /options dictionaries.
To recap: 1. Make sure you contain all 4 files needed for fixedMeanValue pressure BC. 2. follow directions suggested by chegdan in his first post. Chegdan, Thanks for all of your help. Sincerely appreciated. Cheers |
excellent...Good luck in your work!
|
Pressure and speed outlet unknown
Hi all my name is Sergi and I'm trying to simulate a flow inside a tube with water (interFoam) and what I want to do is to check the difference between the outlet and inlet pressure to purge the system or not.
The thing is that I don't know which kind of boundary condition do I have to set on the outlet in order to allow the program calculate the pressure with respect the speed or whatever. Any ideas? Thanks! |
Dear Foamers,
I'd like to add the BC fixedMeanValue into my OpenFOAM 2.1.x, but I can't put it into $FOAM_SRC/finiteVolume/fields/fvPatchFields and re-compile (as suggested above) since I'm working on a cluster and I don't have permission to write there. I'm not at all advanced in "all this compiling bussiness". So is there a way to go around it? Thank you so much for a help! |
is it compilable in of 2.2.0?
|
is fixedMeanValue applicable in groovyBC?
which files should be download for compiling in OF 2.2.0? |
1 Attachment(s)
@immortality: Just to quadruple check if I was crazy or not, I went through the thread, made a new fixedMeanValue from the information on this thread, and it works for OF-2.2.x. It literally took longer to write this post than to actually find out if it was compatible :).
@vanekp if you have the capability of compiling your own solvers/application in your user directory on your cluster, you can use this BC. Just take the attached code, unzip in your user foam directory, move into the directory and do a Code:
wmake libso Code:
libs ( "libfixedMeanValue.so"); Code:
outlet But there is a fixedMean boundary condition in 2.2.x that may be what you want also. |
All times are GMT -4. The time now is 22:32. |