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 |
All times are GMT -4. The time now is 02:28. |