
[Sponsors] 
May 21, 2013, 00:21 
groovyBC_2Way_Coupling_001 example

#1 
Senior Member
Join Date: Jul 2011
Posts: 101
Rep Power: 6 
Hi all, I am not sure if this example is made to work on OF 2.1.1 as I had issues with it. For a start, it can't seem to read the timeVaryingUniform BC and has to be changed to
inlet { type uniformFixedValue; uniformValue tableFile; tableFileCoeffs { fileName "pressureRamp"; outOfBounds clamp; value $internalField; } } Running it now produces the following error: > FOAM FATAL ERROR: Parser Error at "1.2127" :"field Q_int11 not existing or of wrong type" "(Q_int12 + U_relax*(Q_int11  Q_int12))/sum(mag(Sf()))*normal()" From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 802. FOAM exiting Then I tried removing the Q_int11 just as a trial. Now the error becomes: > FOAM FATAL IO ERROR: attempt to read beyond EOF file: /home/caelinux/OpenFOAM/caelinux2.1.0/run/tutorials/incompressible/simpleFoam/groovyBC_2Way_Coupling_001/system/fvSchemes::divSchemes::default at line 41. From function ITstream::read(token&) in file db/IOstreams/Tstreams/ITstream.C at line 83. FOAM exiting 

May 21, 2013, 05:12 

#2  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40 
Quote:
The problem in fvSchemes is certainly unrelated to the boundary condition thing. If I understand your initial sentence correctly this is a case that used to work with an old OF version but now doesn't work anymore (but it is not even clear to me whether you upgraded from or to 2.1.1): the error message you show is typical for instances where some more information is expected before the ';'. My suggestion: check fvSchemes in the tutorials relevant for your solver in the old OFversion (where it used to work) and in the new version and see what changed
__________________
Note: I don't use "Friend"feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request 

May 21, 2013, 05:18 

#3  
Senior Member
Join Date: Jul 2011
Posts: 101
Rep Power: 6 
Quote:
I also read that changing it to the BC above in blue will fix it. Seems that it fixes to run in 2.1.1 but there are more errors as shown above. Is it due to changing the BC or is it something inherent that I am missing out? Or is it version difference causing it? Could you please recommend which version should I run it in? So I can try again. Thanks. 

May 21, 2013, 05:53 

#4  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40 
Quote:
The problem with fvSchemes is almost certainly there because the case is rather old. Copy over a schemesfile from one of the current simpleFoamtutorials and you should be fine (same for fvSolution: I'm sure you're going to see problems there too).
__________________
Note: I don't use "Friend"feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request 

May 21, 2013, 08:23 

#5  
Senior Member
Join Date: Jul 2011
Posts: 101
Rep Power: 6 
Quote:


May 21, 2013, 14:23 

#6 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40 
It is not clear to me what you mean with "Exact same problem". The problem with the boundary conditions or fvScheme?
__________________
Note: I don't use "Friend"feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request 

May 21, 2013, 19:36 

#7 
Senior Member
Join Date: Jul 2011
Posts: 101
Rep Power: 6 

May 22, 2013, 09:52 

#8 
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40 
Currently we can only guess what you changed about your files. So please post the pressure file that you adapted to the new syntax.
fvSolution is definitely not a problem of swak. Check that you really use an updated version
__________________
Note: I don't use "Friend"feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request 

May 22, 2013, 10:00 

#9 
Senior Member
Join Date: Jul 2011
Posts: 101
Rep Power: 6 
Hi, appreciate your help
P dimensions [0 2 2 0 0 0 0]; internalField uniform 1176.471; boundaryField { fixedWalls { type zeroGradient; } inlet { type uniformFixedValue; uniformValue tableFile; tableFileCoeffs { fileName "pressureRamp"; outOfBounds clamp; value $internalField; } } outlet { type fixedValue; value $internalField; } interface11 { type groovyBC; variables "p_int12@interface12=sum(p*mag(Sf()))/sum(mag(Sf()));p_int11=sum(p*mag(Sf()))/sum(mag(Sf()));p_relax=0.3;"; valueExpression "(p_int11 + p_relax*(p_int12  p_int11))"; value $internalField; } interface12 { type zeroGradient; } interface21 { type groovyBC; variables "p_int22@interface22=sum(p*mag(Sf()))/sum(mag(Sf()));p_int21=sum(p*mag(Sf()))/sum(mag(Sf()));p_relax=0.3;"; valueExpression "(p_int21 + p_relax*(p_int22  p_int21))"; value $internalField; } interface22 { type zeroGradient; } } fvSolution solvers { p { solver PCG; preconditioner DIC; tolerance 1e06; relTol 0.01; } U { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } k { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } epsilon { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } R { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } nuTilda { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; residualControl { p 1e2; U 1e3; "(kepsilonomega)" 1e3; } } relaxationFactors { fields { p 0.3; } equations { U 0.7; k 0.7; epsilon 0.7; R 0.7; nuTilda 0.7; } } fvSchemes ddtSchemes { default steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default none; laplacian(nuEff,U) Gauss linear corrected; laplacian((1A(U)),p) Gauss linear corrected; laplacian(DkEff,k) Gauss linear corrected; laplacian(DepsilonEff,epsilon) Gauss linear corrected; laplacian(DREff,R) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } 

May 22, 2013, 10:23 

#10  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40 
Quote:
The problem is that this case is quite old and probably uses a syntax for coupling boundary conditions that is not supported anymore. See the swakpage. "Q_int11@interface11" is now written as "Q_int11{patch'interface11}". That's why it was not found in your initial post. Because it was evaluated on the same patch and assigned to a variable Q_int11@interface11
__________________
Note: I don't use "Friend"feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request 

May 22, 2013, 10:36 

#11 
Senior Member
Join Date: Jul 2011
Posts: 101
Rep Power: 6 
sorry about that, changed the U but forgot about the p, thanks for you help.


Thread Tools  
Display Modes  

