|
[Sponsors] |
[swak4Foam] Field reference in parallel with groovyBC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 10, 2019, 11:54 |
Field reference in parallel with groovyBC
|
#1 |
New Member
Magnus Johannesen
Join Date: Oct 2018
Posts: 3
Rep Power: 8 |
Good day foamers!
I have a problem with groovyBC when referencing field values in parallel. I'm running openfoam 6 with swak4foam developer version, and the case has been tested on both linux and mac with docker giving the same results. The domain is reconstructed blood vessels, and has one inlet and several outlets. For the outlets I'm using a resistance analogy for outflow bounadry condition , and relating the outlet flow to the pressure and resistance in the blood vessels. The setting of groovyBC in U is as follows: Code:
outlet1 //outlet 1 surface4 { type groovyBC; valueExpression "(p/resistance*2/(pi*pow(radius,2))*(1-sphere/pow(radius,2)))*normal()"; variables 8 ( "frac=0.255235606748;" "Q=1e-6;" "xc=0.5*(min(pts().x)+max(pts().x));" "yc=0.5*(min(pts().y)+max(pts().y));" "zc=0.5*(min(pts().z)+max(pts().z));" "radius=sqrt(sum(mag(Sf()))/pi);" "sphere=(pow((pos().y-yc),2)+pow((pos().x-xc),2)+pow((pos().z-zc),2));" "resistance=46751015.7676;" ) ; } I found this note on the contrib/swak4Foam site: Code:
9.6.3 Bugfixes 9.6.3.1 Variables not working for parallel computations If a variable is defined and the patch which it is defined on doesn't have any faces the variable is reported on that processor as not existing and the whole run fails Code:
outlet1 //outlet 1 surface4 { type groovyBC; valueExpression "(average(p)/17028966.9573*2/sum(mag(Sf()))*(1-(pow((pos().y-0.5*(min(pts().y)+max(pts().y))),2)+pow((pos().x-0.5*(min(pts().x)+max(pts().x))),2)+pow((pos().z-0.5*(min(pts().z)+max(pts().z))),2))/(sum(mag(Sf()))/pi)))*normal()"; } I haven't found any recent issues of this problem, so I sincerely hope that someone knows how it is possible to fix it. |
|
February 25, 2020, 07:00 |
|
#2 |
New Member
Adriana Ferreira
Join Date: Sep 2018
Posts: 6
Rep Power: 8 |
Hi Magnus,
I'm facing the same problem by using groovyBC in parallel. In my case, I need to access x position. Everything works well in serie, but then in parallel it blows up at the first iteration. Did you find a solution for your case ? Thank you and Best regards, Adriana |
|
March 4, 2020, 15:18 |
|
#3 |
New Member
Magnus Johannesen
Join Date: Oct 2018
Posts: 3
Rep Power: 8 |
Hi! I did not find a solution. There seems to have been a bug on the bug tracker previously:
https://sourceforge.net/p/openfoam-e...swak4foam/123/ This bug was related to a specific version, and not followed after 2014. You can also look at the thread which lead up to it, maybe it has some ideas that might help. Bug in groovyBC in parallel computation Unfortunately it seems that little has happened since 2014. |
|
Tags |
groovybc, parallel, swak4foam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LEMOS InflowGenerator | r_gordon | OpenFOAM Running, Solving & CFD | 103 | December 18, 2018 01:58 |
''unknown radialModelType type Gidaspow'' PROBLEM WITH THE BED TUTORIAL | AndoniBM | OpenFOAM Running, Solving & CFD | 2 | March 25, 2015 19:44 |
problem with turbulence models after compilation? | lfgmarc | OpenFOAM Programming & Development | 19 | November 20, 2013 01:50 |
OpenFOAM 1.6 ext - Compilation errors - Fedora 17(32bit) | toolpost | OpenFOAM Installation | 15 | September 21, 2012 10:38 |
Constant velocity of the material | Sas | CFX | 15 | July 13, 2010 09:56 |