mixed boundary condition
Dear all,
I have a probably newbie question but i can find the answer by myself I want to implement convective heat transfer using mixed type BC. After checking on the web i found that it could be somethink like that: Code:
So my question is simple (and probably stupid), how to pass an expression in openfoam, (for example fixedValue 273.15+25 instead of 298.15) Thank you very much for help Yann |
Dear Yann
you can use groovyBC. check the openfoamwiki and find more information and the capabilities of groovyBC. |
Dear Paymen
I use openfoam7 and it seems that groovyBC is not an option anymore In the other hand, i tried codedMixed BC typr as the following Code:
top |
Hi,
What solver do you use? What is 0.6 (thermal conductivity? thermal diffusivity? just a random number?)? |
hello,
I am using buoyantPimpleFoam, and the parameter corresponds to water thermal conductivity, I just don't know how to get it properly from thermophysical properties, (If you know I will be glad to know too :) ) I also realize that I made a mistake, according to this well made document: https://foamingtime2.files.wordpress...ction-bc_1.pdf It should be Code:
|
Or
Code:
this->valueFraction() = 1.0/(1+0.6*delta); |
Sorry i am newbie, I don't really understand how to lookup variables like in the example
|
Since the example is general, it has lots of checks, you can get rid of them for your concrete situation. You have mentioned water, so I assume, you use fluidThermo, so the code for kappa lookup is:
Code:
typedef compressible::turbulenceModel turbulenceModel; In BC you can access mesh object like this, for example: Code:
const fvMesh& mesh = patch_.boundaryMesh().mesh(); |
I think i miss something (sorry, i am really bad at c++)
Code:
code |
I do not think you have basicThermo in coded BC. You should use codeInclude section to add necessary includes. Something like:
Code:
codeInclude |
It is asking me a system/codeDict, I never have seen file like this so far.
|
It would be easier to figure out a cause of the problem if you post solver/compiler output. "Guess-what-is-wrong" game can take quite a long time.
|
Sure
Code:
--> FOAM FATAL ERROR: |
Could you post final version of the BC? It seems, you have lost semi-colon, since:
Code:
A special form is if the 'code' section is not supplied. In this case |
Here you go
Code:
FoamFile |
Semicolon is missing after codeInclude entry (so code entry is eaten by codeInclude). It should be:
Code:
top |
Of course, thank you so much
PS: j'espere que tout va bien pour toi dans l'est |
after adding the semicolon, I have another error:
Code:
Using dynamicCode for patch top on field T at line 26 in "/home/yann/Projet/0/T.boundaryField.top" |
The warning is self-explanatory, you do not need ; after #include "fluidThermo.H".
The error is due to missing -I flags. You need to add codeOptions section, there you put -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude: Code:
codeOptions |
Code:
Using dynamicCode for patch top on field T at line 26 in "/home/yann/Projet/0/T.boundaryField.top" Still not working |
All times are GMT -4. The time now is 16:04. |