How to define a dependent boundary condition
Hi,
i would like to define a boundary condition which is dependent of a quantity which is not the time (but the inlet velocity). To be clear, i am currently using externalWallHeatFluxTemperature boundary condition and i would like to use a value of h calculated by a function, from the value of the velocity on the inlet of my geometry (a sort of pipe). Is there a way to use a function of this type or must i create a new boundary condition ? I think i have to use the nonuniform option and the "include file" command but i don't see any examples of the use of such a function. If you need more precision to answer this question, ask questions. Thank you. Laurent |
Hi Laurent,
You can use groovyBC for this purpose. |
Thx a lot, i will take a look on it.
Laurent |
So i have looked for informations related to groovyBC.
I have some questions to do what i want to do : - Do i have to install groovyBC utility ? (i am using OF2.3.1) - What about swak4Foam ? - Is there anywhere a tutorial for this kind of boundary conditions (not in my OF files anyway) ? Thanks everybody who spend some time to help me. Laurent |
Quote:
Quote:
For specific help I fear an actual example (just try to use the BC and see what happens) would be useful. |
I have installed swak4Foam, following the commands given by :
https://openfoamwiki.net/index.php/I...tion/swak4Foam Now i will try to use it to define the value of the h convection coefficient by a function (or a table depending on another quantity which is the velocity on a specific region). When i look availables examples, the BC used is : groovyBC. For example : Code:
atmosphere Can i use the externalWallHeatFluxTemperature linked with the groovyBC ? Or: Do i have to extract expressions used by externalWallHeatFluxTemperature and construct a new one with the changes i want ? Thanks a lot. Laurent |
First a small sugesstion, what is rarely shown, but makes things a lot easier to read, reformat the variables section so you can have one variable per line:
Code:
atmosphere Alternatively use any textbook on heat transfer (or you knowledge) to specify a suitable equation yourself. Reading the C++ code can be confusing if you're not used to it. |
Thank you for the tip, it is very easier to read.
Quote:
Another question : Can i use a function name or a function number for the expression of a variable (h in my case) and fill the function in another file (with a include file i suppose) ? Last one (for the moment) : Can i use a tabular in place of the expression, with for example a value of h depending on the value of Uinlet ? In this case, the tabular can be written in another file. Thanks for your time. |
Quote:
Quote:
|
I have read the topic you have indicated to me. It is very useful thank you very much.
Only one thing is still a problem. Can i use groovyBC but with a lookuptables for a variable and not for the main field ? For example, in the case : Code:
ailetteFace Laurent |
I think i am on the right road to my objective.
Doing this for example : Code:
ailetteFace Code:
( Can anyone confirm it is the good way ? (don't be affraid about the numerical values, it is completely crazy, i am just trying to build the boundary condition as i want for the moment. I will fulfill the good values and the good dependencies after.) How can i verify that the value written on the tabular are read correctly ? Thanks. Laurent |
I think i am on the right road to my objective.
Doing this for example : Code:
ailetteFace Code:
( Can anyone confirm it is the good way ? (don't be affraid about the numerical values, it is completely crazy, i am just trying to build the boundary condition as i want for the moment. I will fulfill the good values and the good dependencies after.) How can i verify that the value written on the tabular are read correctly ? Thanks. Laurent |
All times are GMT -4. The time now is 12:31. |