|
[Sponsors] |
September 21, 2018, 06:36 |
groovyBC coupling two boundaries
|
#1 |
Member
Mehdi Aminyavari
Join Date: Feb 2016
Location: Milan
Posts: 35
Rep Power: 10 |
Hello Forum!
I am trying to couple two boundaries in OF using grooviBC meaning that I want the flux that gets out of bundary "gasOut" to come back in from boundary "Center", I tried to dublicate what is written here: http://openfoamwiki.net/index.php/Contrib/groovyBC as following: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { walls { type fixedValue; value uniform (0 0 0); } liqout { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } liqin { type flowRateInletVelocity; massFlowRate constant 0.00020964; value uniform (0 0 0); } gasout { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } gasin { type flowRateInletVelocity; massFlowRate constant 3.74429e-05; value uniform (0 0 0); } center { type groovyBC; variables "Q_gas@gasout=-1*sum(phi);Q_center=sum(phi);U_relax=0.3;"; valueExpression "(Q_center + U_relax*(Q_gas - Q_center))/sum(mag(Sf()))*normal()"; fractionExpression "1"; value $internalField; } side1 { type cyclicAMI; } side2 { type cyclicAMI; } } // ************************************************************************* // --> FOAM FATAL ERROR: Parser Error for driver PatchValueExpressionDriver at "1.22-26" :"field Q_gas not existing or of wrong type" "(Q_center + U_relax*(Q_gas - Q_center))/sum(mag(Sf()))*normal()" ^^^^^ -----------------------| Context of the error: - From dictionary: /home/mehdi/OpenFOAM/mehdi-3.0.1/run/CFD2018/cavityTestQ/0/U.boundaryField.center Evaluating expression "(Q_center + U_relax*(Q_gas - Q_center))/sum(mag(Sf()))*normal()" From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 1210. FOAM exiting seems that OF doesn't understand the Q_gas@gasout in my groovy boundary condition... Any help is appreciated in advance. Thanks |
|
September 25, 2018, 05:18 |
Still hanging there
|
#2 |
Member
Mehdi Aminyavari
Join Date: Feb 2016
Location: Milan
Posts: 35
Rep Power: 10 |
Anyone out there ?!
|
|
September 25, 2018, 07:59 |
|
#3 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hi there,
A Good day to you. You have a syntax error in your sepcification of the "variables"... try this out..: Code:
center { type groovyBC; variables ( "Q_gas{patch'gasout}=-1*sum(phi);" "Q_center=sum(phi);" "U_relax=0.3;" ); valueExpression "(Q_center + U_relax*(Q_gas - Q_center))/sum(mag(Sf()))*normal()"; fractionExpression "1"; value $internalField; } Philippose |
|
September 27, 2018, 04:51 |
Many Thanks
|
#4 | |
Member
Mehdi Aminyavari
Join Date: Feb 2016
Location: Milan
Posts: 35
Rep Power: 10 |
Quote:
Dear Philippose, I tried it and it worked!! Thank you so much for your time and care. But it is very strange to me since I exactly used the syntax that was on the official website of groovy !! Thank you so much again... Have a lovely day |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 04:30 |
Difference between stagger/coupling iteration and coupling step | Jiricbeng | CFX | 1 | September 13, 2016 03:37 |
Coupling time duration, Coupling time steps | Jiricbeng | CFX | 0 | April 29, 2015 09:37 |
[swak4Foam] groovyBC for coupling of patches | deniggo | OpenFOAM Community Contributions | 20 | October 2, 2014 19:04 |
[swak4Foam] groovyBC, coupling inlet with velocity at specific point location | olivierG | OpenFOAM Community Contributions | 6 | June 23, 2012 09:44 |