CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh

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

Like Tree5Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   May 24, 2009, 02:45
Default
  #41
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Luther

The problem is not related to groovyBC but to /system/fvSolution, as stated in the error message. Try to copy e.g. the /system/fvSolution from /tutorials/interFoam/damBreak and see if it does not solve the problem, as it should be working with interFoam.

Best regards,

Niels
ngj is offline   Reply With Quote

Old   May 24, 2009, 03:13
Default
  #42
New Member
 
Luther Terblanche
Join Date: May 2009
Posts: 15
Rep Power: 8
luther is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Luther

The problem is not related to groovyBC but to /system/fvSolution, as stated in the error message. Try to copy e.g. the /system/fvSolution from /tutorials/interFoam/damBreak and see if it does not solve the problem, as it should be working with interFoam.

Best regards,

Niels
Hi Niels,

Yes I have changed the two preconditioners it was complaining about in the fvSolution file to preconditioner DIC. And then it worked. Would have to read up on what it entails.

Thank you for the post.

Regards
Luther
luther is offline   Reply With Quote

Old   May 26, 2009, 04:53
Default
  #43
New Member
 
Luther Terblanche
Join Date: May 2009
Posts: 15
Rep Power: 8
luther is on a distinguished road
Hallo Bernard (or anyone else that would be able to help),

First of all, thank you for the help. I have managed to get the groovyBC case working for simulating a wave in a 2D flume.

I have now been trying to apply it to a 3D case. I have made a mesh in gmsh and converted it using gmshToFoam. With the conversion I got a warning message saying it found a number of undefined faces in the mesh and are adding them to the default patch. However, when I look in the constant/polyMesh/boundary file it generated I find:

defaultFaces
{
type patch;
nFaces 0;
.....
}

Would that mean there is 0 default Faces?

If I choose to ignore it and set everything up pretty much the same as in the groovyWaveTank example I find that the simulation crashes near the start. The Courant numbers grow out of control. Here is the massage:

MULES: Solving for gamma
Liquid phase volume fraction = 0.4197596 Min(gamma) = -1.1716894e-19 Max(gamma) = 1.0015516
MULES: Solving for gamma
Liquid phase volume fraction = 0.41975964 Min(gamma) = -4.9807421e-20 Max(gamma) = 1.0000001
MULES: Solving for gamma
Liquid phase volume fraction = 0.41975967 Min(gamma) = -1.271157e-19 Max(gamma) = 1.097679
GAMG: Solving for pd, Initial residual = 0.89005896, Final residual = 0.029750488, No Iterations 3
GAMG: Solving for pd, Initial residual = 0.99557433, Final residual = 0.033653032, No Iterations 3
DICPCG: Solving for pd, Initial residual = 0.99572845, Final residual = 9.8705723e-08, No Iterations 324
time step continuity errors : sum local = 0.0010253293, global = -8.0769936e-07, cumulative = -8.0897217e-07
ExecutionTime = 63.5 s ClockTime = 64 s
Courant Number mean: 5588.1394 max: 64637244
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/luther/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/luther/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xb8034400]
#3 Foam::Time::adjustDeltaT() in "/home/luther/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::Time::setDeltaT(double) in "/home/luther/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 main in "/home/luther/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interFoam"
#6 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#7 Foam::regIOobject::readIfModified() in "/home/luther/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/interFoam"
Floating point exception


Then when I have a look at the few results generated it seems like the initial gamma field is set everywere except at the inlet face, where the groovyBC is defined. I use setFields and interFoam. Am I doing something wrong? Anybody with some advice I will really appreciate it. I attach the case I am playing around with if you would like to have a look yourself.

Here is the case file:

http://dip.sun.ac.za/~luther/OF/poles.tar.gz


Kind regards
Luther
luther is offline   Reply With Quote

Old   May 26, 2009, 07:24
Default
  #44
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Luther

Have you added the libGroovyBC (or what it is called), to the controlDict? If not, then it will not execute the Groovy with setFields, and thus the inlet boundary face will be empty.
Look at the wiki on how to add it.

Niels
ngj is offline   Reply With Quote

Old   May 26, 2009, 07:59
Default
  #45
New Member
 
Luther Terblanche
Join Date: May 2009
Posts: 15
Rep Power: 8
luther is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Luther

Have you added the libGroovyBC (or what it is called), to the controlDict? If not, then it will not execute the Groovy with setFields, and thus the inlet boundary face will be empty.
Look at the wiki on how to add it.

Niels
Hi Niels,

Thank you for your reply. I did remember to add the line " libs("libgroovyBC.so"); " to the bottom of controlDict.

Let me know if you think of anything else by any chance.

Kind Regards
Luther
luther is offline   Reply With Quote

Old   May 26, 2009, 08:21
Default
  #46
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
Hi Luther

I have looked at your case file, and several things are off, non of which are related to groovyBC, however let us take it in this tread:

1. You are calculating the surface elevation around z=0 which is also the z-value on one of your boundary patches, even though your setFieldsDict suggest that you want to have the waves averaged around z=2.1.

2. I don't think the mesh resolution is anything near sufficient to resolve the physics you are interested in. Especially because you are having rather large tetrahedrals around the free surface. The scale of which are order of magnitude the wave amplitude.

3. You apply deep water theory, however you are in intermediate waters (0.1 < h/L = 0.4 < (pi or 2 * pi)), thus the applied theory is not correct.

These are the things I have noticed would cause you trouble, however I am almost certain that it is (1) which cause the blow-up.

Best regards,

Niels
ngj is offline   Reply With Quote

Old   May 26, 2009, 08:42
Default
  #47
New Member
 
Luther Terblanche
Join Date: May 2009
Posts: 15
Rep Power: 8
luther is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Luther

I have looked at your case file, and several things are off, non of which are related to groovyBC, however let us take it in this tread:

1. You are calculating the surface elevation around z=0 which is also the z-value on one of your boundary patches, even though your setFieldsDict suggest that you want to have the waves averaged around z=2.1.

2. I don't think the mesh resolution is anything near sufficient to resolve the physics you are interested in. Especially because you are having rather large tetrahedrals around the free surface. The scale of which are order of magnitude the wave amplitude.

3. You apply deep water theory, however you are in intermediate waters (0.1 < h/L = 0.4 < (pi or 2 * pi)), thus the applied theory is not correct.

These are the things I have noticed would cause you trouble, however I am almost certain that it is (1) which cause the blow-up.

Best regards,

Niels
Hi Niels,

Thanks.

Regarding (1): I will most certainly try it this evening. I have not been looking out for that and it makes sense that it could be the cause.

Regarding (2) and (3): I was not giving any attention to the wave theory or the mesh resolution itself at this stage. I was merely trying to see if I can apply the groovyBC from groovyWaveTank to a 3D case.

Thank you very much for the effort of looking into it. Hopefully it would not be too long before I can also make useful contributions to the forum.

Regards
Luther
luther is offline   Reply With Quote

Old   October 15, 2009, 11:38
Default
  #48
Member
 
Gautami Erukulla
Join Date: Mar 2009
Posts: 30
Rep Power: 8
gautami is on a distinguished road
Hello,

I tried to run the groovyBC movingConeDistorted case from the following link:

https://openfoam-extend.svn.sourcefo...roovyBC/Demos/

I did not make any changes to the case,and tried to run it as it is on OpenFOAM 1-5,suse linux 10.3.

But I end up getting this error.

Not Implemented
Trying to construct an genericFvPatchField on patch movingWall of field cellMotionUx#0 Foam::error:rintStack(Foam::Ostream&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::genericFvPatchField<double>::genericFvPatchF ield(Foam::fvPatch const&, Foam:imensionedField<double, Foam::volMesh> const&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"

Can someone please help me.

Thankyou,
Gautami.
gautami is offline   Reply With Quote

Old   October 16, 2009, 05:36
Default
  #49
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gautami View Post
Hello,

I tried to run the groovyBC movingConeDistorted case from the following link:

https://openfoam-extend.svn.sourcefo...roovyBC/Demos/

I did not make any changes to the case,and tried to run it as it is on OpenFOAM 1-5,suse linux 10.3.

But I end up getting this error.

Not Implemented
Trying to construct an genericFvPatchField on patch movingWall of field cellMotionUx#0 Foam::error:rintStack(Foam::Ostream&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::genericFvPatchField<double>::genericFvPatchF ield(Foam::fvPatch const&, Foam:imensionedField<double, Foam::volMesh> const&) in "/home/gali/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so"
The problem is that the library was not loaded (for whatever reason) and consequently the solver does not know about the boundary condition.

Check the output of the solver further up

Bernhard
gschaider is offline   Reply With Quote

Old   October 20, 2009, 11:01
Default
  #50
Member
 
Gautami Erukulla
Join Date: Mar 2009
Posts: 30
Rep Power: 8
gautami is on a distinguished road
Hello Mr Gschaider,

Thank you.
I could run the distortedmovingcone case without any error.
The problem was a small mistake at my end.(sorry)

Thankyou,
Gautami.
gautami is offline   Reply With Quote

Old   October 23, 2009, 05:56
Default
  #51
Member
 
David GISEN
Join Date: Jul 2009
Location: Germany
Posts: 37
Rep Power: 8
David* is on a distinguished road
Hello Foamers,
has somebody dealt with the groovyWaveTank demo? I wonder how the initial condition for gamma on the inlet patch is been set, as my setFields just writes the List<scalar> for the internalField. The result is, that I get a zero initial condition at the inlet. Does somebody know how to do this?
Thanks in advance,
David
David* is offline   Reply With Quote

Old   October 27, 2009, 14:35
Default
  #52
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 10
braennstroem is on a distinguished road
Hi Bernhard,

I wonder, if your groovyBC is able to connect two boundary conditions!? E.g. is it possible to get the area averaged value of one patch to another one?

Would be great, if this works!

Fabian
braennstroem is offline   Reply With Quote

Old   October 28, 2009, 16:11
Default
  #53
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by braennstroem View Post
I wonder, if your groovyBC is able to connect two boundary conditions!? E.g. is it possible to get the area averaged value of one patch to another one?
Currently not. Shouldn't be too hard (I thought about it once) but I'll have to have a look who to do it concretly

Bernhard
gschaider is offline   Reply With Quote

Old   November 6, 2009, 03:32
Default
  #54
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 8
chiven is on a distinguished road
Hi, dear friends, I am trying to update the dambreak case of interPhaseChangeFoam for OF-1.5 to OF-1.6, and just meet the same problem like #40.
The alpha1 setting is
Code:
    alpha1
    {
        MULESImplicit
        {
        maxIter 1000;
        nLimiterIter 10;
        maxUnboundedness 1;
        CoCoeff 0.2;
        solver
        {
        solver          PBiCG;
        preconditioner   DILU;
        tolerance        1e-10;
        relTol           0;
        }
        }
    }
The case and the terminal prompt are attached. Any suggestions are appreciated.

Have a good day!
chiven

------------------------------------------------------------------------------------------------------------------------
Starting time loop
Courant Number mean: 0 max: 0
deltaT = 2.4e-05
Time = 2.4e-05

Attempt to return dictionary entry as a primitive
file: /work/g2/e090012/dambreak/system/fvSolution::solver from line 58 to line 60.
From function ITstream& primitiveEntry::stream() const
in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 83.
FOAM aborting
#0 _ZN4Foam5error10printStackERNS_7OstreamE-0x1466af0
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#1 _ZN4Foam7IOerror5abortEv-0x1989560
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#2 _ZNK4Foam15dictionaryEntry6streamEv-0x1921900
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#3 _ZNK4Foam10dictionary6lookupERKNS_4wordEbb-0x19476e0
in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#4 void Foam::MULES::implicitSolve<Foam:neField, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam:neField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, double, double) in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxIA64GccDPOpt/interPhaseChangeFoam"
#5 main in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxIA64GccDPOpt/interPhaseChangeFoam"
#6 __libc_start_main-0x1060880
in "/lib/tls/libc.so.6.1"
#7 _start in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxIA64GccDPOpt/interPhaseChangeFoam"
Abort
Attached Files
File Type: zip dambreak.zip (65.3 KB, 5 views)
chiven is offline   Reply With Quote

Old   November 6, 2009, 05:57
Default
  #55
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by chiven View Post
Hi, dear friends, I am trying to update the dambreak case of interPhaseChangeFoam for OF-1.5 to OF-1.6, and just meet the same problem like #40.
The alpha1 setting is
I fail to get the significance of this for this thread. Especially if you look at #41 and #42 where a solution strategy for this was discussed
gschaider is offline   Reply With Quote

Old   November 6, 2009, 06:54
Default
  #56
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 8
chiven is on a distinguished road
Quote:
Originally Posted by gschaider View Post
I fail to get the significance of this for this thread. Especially if you look at #41 and #42 where a solution strategy for this was discussed
hi, bernhard, thanks a lot for your reply.
I have tried what #41 and #42 said, but faild. These days I am struggling with this problem. And some other friends in this forums also meet the same problems. Any suggestiohs are precious for us.
Best regards,
Chiven
chiven is offline   Reply With Quote

Old   November 6, 2009, 14:09
Default
  #57
Member
 
Gautami Erukulla
Join Date: Mar 2009
Posts: 30
Rep Power: 8
gautami is on a distinguished road
Hello,

I am trying to simulate a wave tank case in interDyMFoam.
I have set the inlet as groovyBC.
I want to set the expression for the inlet in pointMotionUx dictionary as follows:

if (time>1 and time<=2 expression-1) if (time>2 and time<3 expression-2) else zero.

I am trying to do it a follows,but I get an error.

valueExpression "toPoint((time()>1 && time()<=2) ? A*w*cos(w*time()) (time()>2 && time()<3) ? B*v*cos(w*time()) : 0 )";

How do I input such expression?
ThankYou.


Regards,
Gautami.
gautami is offline   Reply With Quote

Old   November 6, 2009, 14:36
Default
  #58
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 10
braennstroem is on a distinguished road
Hi Bernhard,

thanks for the info! Shouldn't be so hard sounds good ...

Fabian
braennstroem is offline   Reply With Quote

Old   November 9, 2009, 04:33
Default
  #59
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 8
Arnoldinho is on a distinguished road
Hi, did anybody successfully test and use the groovyBC with OpenFOAM 1.6?
From the errors I get, I guess that a few things have to be changed due to differences in calling of constants etc. between 1.5 and 1.6...

Arne
Arnoldinho is offline   Reply With Quote

Old   November 9, 2009, 05:56
Default
  #60
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Arnoldinho View Post
Hi, did anybody successfully test and use the groovyBC with OpenFOAM 1.6?
From the errors I get, I guess that a few things have to be changed due to differences in calling of constants etc. between 1.5 and 1.6...
The has been a separate versioon that compiles with 1.6 for some months, but obviously I never updated
http://openfoamwiki.net/index.php/Co...ovyBC#Download
(nevertheless, the 1.6 URL could have been easily guessed from the 1.5-URL)

Bernhard
gschaider is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FunkySetFields for OF 141 mer OpenFOAM Pre-Processing 71 June 11, 2014 11:34
Running funkySetFields sara OpenFOAM Running, Solving & CFD 10 October 3, 2012 10:08
FunkySetFields dictionary gschaider OpenFOAM Running, Solving & CFD 14 December 3, 2008 22:13
FunkySetFields for cyclic bc zakifoam OpenFOAM Pre-Processing 1 December 18, 2007 08:24


All times are GMT -4. The time now is 17:26.