groovyBC_2Way_Coupling_001 example
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.21-27" :"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/caelinux-2.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 |
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 OF-version (where it used to work) and in the new version and see what changed |
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. |
Quote:
The problem with fvSchemes is almost certainly there because the case is rather old. Copy over a schemes-file from one of the current simpleFoam-tutorials and you should be fine (same for fvSolution: I'm sure you're going to see problems there too). |
Quote:
|
Quote:
|
Quote:
|
Quote:
fvSolution is definitely not a problem of swak. Check that you really use an updated version |
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 1e-06; relTol 0.01; } U { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0.1; } k { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0.1; } epsilon { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0.1; } R { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0.1; } nuTilda { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0.1; } } SIMPLE { nNonOrthogonalCorrectors 0; residualControl { p 1e-2; U 1e-3; "(k|epsilon|omega)" 1e-3; } } 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((1|A(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 ; } |
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 swak-page. "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 |
sorry about that, changed the U but forgot about the p, thanks for you help.
|
All times are GMT -4. The time now is 16:58. |