groovyBC with chtMultiRegionFoam
Hello people,
I know the usage of groovyBC in terms of using scalar or vector fields of other patches within the simulation domain. But I have the case that I want to use a scalar field from another region. For example I want to set a wall boundary condition of SOLID1 with the average temperature of another wall in region SOLID2 (The walls are not connected!). Does anyone know such function? I can't find anything about this kind of usage. Or does someone know another solution for that problem beyond groovyBC ? |
GroovyBC Using DIfferent Regions
In response to this question, I found a resource that talks about how to do what you want:
https://openfoamwiki.net/images/1/1e...dSwak4Foam.pdf It says do this: varName{parserType’name/regionName}=expression; So you would do something like this Treg2{patch'name-of-patch/region2}=sum(T*area())/sum(area()); |
All times are GMT -4. The time now is 23:15. |