CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

groovyBC_2Way_Coupling_001 example

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2013, 01:21
Default groovyBC_2Way_Coupling_001 example
  #1
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
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
haze_1986 is offline   Reply With Quote

Old   May 21, 2013, 06:12
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by haze_1986 View Post
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
Could you please start again? The boundary condition you're specifying (uniformFixedValue) has got nothing to with the error message you're posting (which is from swak/groovyBC) and the fix you're doing.

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
__________________
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
gschaider is offline   Reply With Quote

Old   May 21, 2013, 06:18
Default
  #3
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Could you please start again? The boundary condition you're specifying (uniformFixedValue) has got nothing to with the error message you're posting (which is from swak/groovyBC) and the fix you're doing.

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
Hi, would like to clarify, in the example the inlet type is timeVaryingUniform BC and I read somewhere that it is no longer in OF2.1.1 (I installed this version from scratch)

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.
haze_1986 is offline   Reply With Quote

Old   May 21, 2013, 06:53
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by haze_1986 View Post
Hi, would like to clarify, in the example the inlet type is timeVaryingUniform BC and I read somewhere that it is no longer in OF2.1.1 (I installed this version from scratch)

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.
Took me some googling to find out which case you're talking about: it's the one downloaded from http://openfoamwiki.net/index.php/Contrib_groovyBC, right? 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

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).
__________________
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
gschaider is offline   Reply With Quote

Old   May 21, 2013, 09:23
Default
  #5
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Took me some googling to find out which case you're talking about: it's the one downloaded from http://openfoamwiki.net/index.php/Contrib_groovyBC, right? 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

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).
Hi I have just did as you advised, still the exact same problem. Schemes files from pitzDaily example.
haze_1986 is offline   Reply With Quote

Old   May 21, 2013, 15:23
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by haze_1986 View Post
Hi I have just did as you advised, still the exact same problem. Schemes files from pitzDaily example.
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
gschaider is offline   Reply With Quote

Old   May 21, 2013, 20:36
Default
  #7
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
Quote:
Originally Posted by gschaider View Post
It is not clear to me what you mean with "Exact same problem". The problem with the boundary conditions or fvScheme?
Hi, both problems. It is exactly the same.
haze_1986 is offline   Reply With Quote

Old   May 22, 2013, 10:52
Default
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by haze_1986 View Post
Hi, both problems. It is exactly the same.
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
gschaider is offline   Reply With Quote

Old   May 22, 2013, 11:00
Default
  #9
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
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 ;
}
haze_1986 is offline   Reply With Quote

Old   May 22, 2013, 11:23
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by haze_1986 View Post
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;
}
It is a bit hard to help you if you don't read my answers: I quote from my previous message

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
__________________
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
gschaider is offline   Reply With Quote

Old   May 22, 2013, 11:36
Default
  #11
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
sorry about that, changed the U but forgot about the p, thanks for you help.
haze_1986 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:44.