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

[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2011, 08:10
Default
  #61
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 egp View Post
I am getting an error when trying to use the fpos functionality in swak4Foam>funkySetFields.

funkySetFields -latestTime
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6-ext-943ecc426649
Exec : funkySetFields -latestTime
Date : Mar 25 2011
Time : 04:58:35
Host : egpMBA.local
PID : 70817
Case : /Users/egp/OpenFOAM/egp-1.6-ext/run/RayleighTaylor/coarse
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 1

Part: Alpha
Putting "average((fpos().y+surf(0.5)*fproj().y)>=surf(-0.05)*cos(surf(6.2831)*fpos().x) ? surf(1.0) : surf(0.))" into field alpha1 at t = "1" if condition "true" is true

--> FOAM FATAL ERROR:
Parser Error at "1.9-12" :"syntax error, unexpected TOKEN_fposition"
"average((fpos().y+surf(0.5)*fproj().y)>=surf(-0.05)*cos(surf(6.2831)*fpos().x) ? surf(1.0) : surf(0.))"
" ^^^^ "

From function parsingValue
in file lnInclude/CommonValueExpressionDriverI.H at line 365.

FOAM exiting

This is strange since swak4FoamParsers/FieldValueExpressionDriver.C creates an IOobject named "fpos", and the machinery appears to largely be in place for surface field operations.

Note: this funkySetFieldsDict works just fine with the stand-alone FSF.
Hi Eric!

The error popped up here just yesterday too. If you check you'll see that instead of average the function sum won't work too but integrate and reconstruct will still work like the old-school FSF.

The problem is (haven't verified yet but am quite sure) that I introduced another average/sum into the grammar that reduces the whole field to one number and that obviously "shadows" the old average. To avoid any further confusion I will rename the old average (the one you need. Sorry for the incompatibility) to fvAverage and push the change to the mercurial-repository

Bernhard
gschaider is offline   Reply With Quote

Old   March 25, 2011, 08:39
Default
  #62
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 gschaider View Post
Hi Eric!

The error popped up here just yesterday too. If you check you'll see that instead of average the function sum won't work too but integrate and reconstruct will still work like the old-school FSF.

The problem is (haven't verified yet but am quite sure) that I introduced another average/sum into the grammar that reduces the whole field to one number and that obviously "shadows" the old average. To avoid any further confusion I will rename the old average (the one you need. Sorry for the incompatibility) to fvAverage and push the change to the mercurial-repository
While trying to implement the fix I discovered that it is already there (no need to pull anything): the "old" average is now faceAverage. Old sum is now surfSum. So the only thing that remains is documenting it. That will probably take longer
gschaider is offline   Reply With Quote

Old   March 26, 2011, 06:19
Default
  #63
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 18
egp is on a distinguished road
Thanks, Bernhard. That fixed my problem!!

Quote:
Originally Posted by gschaider View Post
While trying to implement the fix I discovered that it is already there (no need to pull anything): the "old" average is now faceAverage. Old sum is now surfSum. So the only thing that remains is documenting it. That will probably take longer
egp is offline   Reply With Quote

Old   March 29, 2011, 07:44
Default
  #64
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
Dear all,

I m experiencing a problem with the division operator "/". Any time i use it to define a heat source the simulations crashes. The expression looks like:

Code:
variables    "Xmin=-0.15;Ymin=0.0;Zmin=-0.15;Xmax=0.15;Ymax=0.3;Zmax=0.15;power=27000;V=(Xmax-Xmin)*(Ymax-Ymin)*(Zmax-Zmin);powerDens=power/V;";
I tried various possibilities but I always get a similar error message (see below) except when using a numerical value in the denominator, e.g. powerDens=power/0.027. I use OF 1.6.x, bison 2.4 and flex 2.5.35.

Thanks in advance for your help!
Aram

Code:
Solving for fluid region air
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Ux, Initial residual = 9.83737e-28, Final residual = 9.83737e-28, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 1.12552e-05, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 7.26874e-12, Final residual = 7.26874e-12, No Iterations 0
[1] #0[3]   Foam::error::printStack(Foam::Ostream&)#0  Foam::error::printStack(Foam::Ostream&)[0] [2] #0  #0  Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[3] #1  Foam::sigFpe::sigFpeHandler(int) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[1] #1  Foam::sigFpe::sigFpeHandler(int) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[2] #1  Foam::sigFpe::sigFpeHandler(int) in  in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[0] #1  Foam::sigFpe::sigFpeHandler(int)"/home/aa/OpenFOAM/OpenFOA in "M-1.6.x/l/home/aa/ib/linux64OGpenFOAMccDPOpt/l/OpenFOAM-1.6ibOpenFO.x/lib/liAM.so"
[1] #2  nux64GccDPOpt/libOpenFOAM.so"
[2] #2  ?? in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[0] #2   in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[3] #2  ?? in "/lib/libc.so.6"
[1] #3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/lib/libc.so.6"
[2] #3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&)???? in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[1] #4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/lib/libc.so.6"
[3] #3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
[1] #5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[2] #4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFO in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"A
[1] #6M/OpenFOAM-1.6.x/  lib/linparserField::FieldValueExpressionParser::parse()ux64GccDPOpt/libOpenFOAM.so"
[3] #4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
[2] #5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/lib/libc.so.6"
[0] #3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
[2] #6  parserField::FieldValueExpressionParser::parse() in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
[3] #5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[1] #7  Foam::FieldValueExpressionDriver::parse(std::string const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[2] #7  Foam::FieldValueExpressionDriver::parse(std::string const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
[3] #6  parserField::FieldValueExpressionParser::parse() in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[2] #8  Foam::CommonValueExpressionDriver::evaluateVariable(Foam::word const&, Foam::string const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
[0] #4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[2] #9  Foam::CommonValueExpressionDriver::addVariables(Foam::string const&, bool) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[1] #8  Foam::CommonValueExpressionDriver::evaluateVariable(Foam::word const&, Foam::string const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
[0] #5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[3] #7  Foam::FieldValueExpressionDriver::parse(std::string const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[1] #9  Foam::CommonValueExpressionDriver::addVariables(Foam::string const&, bool) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[2] #10  Foam::CommonValueExpressionDriver::addVariables(Foam::List<Foam::string> const&, bool) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
[0] #6  parserField::FieldValueExpressionParser::parse() in "/home/aa/Ope in "/home/aa/OpenFOAM/aa-1.6.x/lib/nFOAM/aa-1.6.x/linux64GccDPOpt/libswak4FoamParlib/linux64GccDPOpt/libswak4FoamParsers.so"
[3] #8  sers.so"
[1] #10  Foam::CommonValueExpressionDriver::addVariables(Foam::List<Foam::string> const&, bool)Foam::CommonValueExpressionDriver::evaluateVariable(Foam::word const&, Foam::string const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[2] #11   in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[1] #11  Foam::expressionSource<double>::operator()()Foam::expressionSource<double>::operator()() in "/h in "/home/aa/OpenFOAM/aa-1.6.x/lib/ in "/holme/aa/OpenFOAM/aa-1.6.x/liib/linux64GccDPOpt/libswak4FoamParsers.so"
[0] #7  Foam::FieldValueExpressionDriver::parse(std::string const&)nux64GccDPOpt/libswakSourceFields.so"
[2] #12  ome/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[3] #9  Foam::CommonValueExpressionDriver::addVariables(Foam::string const&, bool) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswakSourceFields.so"
[1] #12   in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[0] #8  Foam::CommonValueExpressionDriver::evaluateVariable(Foam::word const&, Foam::string const&)main in "/home/aa/OpenFOAM in "/ho/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[3] #me/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[0] #9  Foam::CommonValueExpressionDriver::addVariables(Foam::string const&, bool)10  Foam::CommonValueExpressionDriver::addVariables(Foam::List<Foam::string> const&, bool)main in "/home/aa/OpenFOAM/aa-1.6.x/lib/linu in "/homex/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[0] #10  Foam::CommonValueExpressionDriver::addVariables(Foam::List<Foam::string> const&, bool)64GccDPOpt/libswak4FoamParsers.so"
[3] #11  Foam::expressionSource<double>::operator()() in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionFoamMF"
[2] #13  __libc_start_main in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionFoamMF"
[1] #13  __libc_start_main in "/home/aa/OpenFOAM/aa-1.6.x/lib/lin in "/home/aa/OpenFOAM/aa-1.6.ux64GccDPOx/lib/linux64GccDPOpt/libswak4FoamParsers.so"
[0] #11  Foam::expressionSource<double>::operator()()pt/libswakSourceFields.so"
[3] #12   in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswakSourceFields.so"
[0] #12   in "/lib/libc.so.6"
[2] #14   in "/lib/libc.so.6"
[1] #14  main_startmain_start in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionFoamMF"
[0] #13  __libc_start_main in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64G at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
[lws16:21853] *** Process received signal ***
[lws16:21853] Signal: Floating point exception (8)
[lws16:21853] Signal code:  (-6)
[lws16:21853] Failing at address: 0x3e80000555d
[lws16:21853] [ 0] /lib/libc.so.6 [0x7f23f762e040]
[lws16:21853] [ 1] /lib/libc.so.6(gsignal+0x35) [0x7f23f762dfb5]
[lws16:21853] [ 2] /lib/libc.so.6 [0x7f23f762e040]
[lws16:21853] [ 3] /home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_+0xc1) [0x7f23f85daea1]
[lws16:21853] [ 4] /home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so(_ZN4Foam6divideINS_12fvPatchFieldENS_7volMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0xd8) [0x7f23fa2615a8]
[lws16:21853] [ 5] /home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so(_ZN4FoamdvINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_SA_+0x214) [0x7f23fa26de74]
[lws16:21853] [ 6] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN11parserField26FieldValueExpressionParser5parseEv+0x6e5d) [0x7f23f8bc4fcd]
[lws16:21853] [ 7] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam26FieldValueExpressionDriver5parseERKSs+0x5d) [0x7f23f8ccef9d]
[lws16:21853] [ 8] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam27CommonValueExpressionDriver16evaluateVariableERKNS_4wordERKNS_6stringE+0x22) [0x7f23f8cbcb72]
[lws16:21853] [ 9] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam27CommonValueExpressionDriver12addVariablesERKNS_6stringEb+0x481) [0x7f23f8cbe7c1]
[lws16:21853] [10] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam27CommonValueExpressionDriver12addVariablesERKNS_4ListINS_6stringEEEb+0x39) [0x7f23f8cbecd9]
[lws16:21853] [11] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswakSourceFields.so(_ZN4Foam16expressionSourceIdEclEv+0x2d) [0x7f23f893c72d]
[lws16:21853] [12] chtMultiRegionFoamMF [0x44c8e9]
[lws16:21853] [13] /lib/libc.so.6(__libc_start_main+0xe6) [0x7f23f76195a6]
[lws16:21853] [14] chtMultiRegionFoamMF [0x423dd9]
[lws16:21853] *** End of error message ***
 in "/lib/libc.so.6"
[0] #14   at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
[lws16:21852] *** Process received signal ***
[lws16:21852] Signal: Floating point exception (8)
[lws16:21852] Signal code:  (-6)
[lws16:21852] Failing at address: 0x3e80000555c
[lws16:21852] [ 0] /lib/libc.so.6 [0x7fbdc5113040]
[lws16:21852] [ 1] /lib/libc.so.6(gsignal+0x35) [0x7fbdc5112fb5]
[lws16:21852] [ 2] /lib/libc.so.6 [0x7fbdc5113040]
[lws16:21852] [ 3] /home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so(_ZN4Foam6divideERNS_5FieldIdEERKNS_5UListIdEES6_+0xc1) [0x7fbdc60bfea1]
[lws16:21852] [ 4] /home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so(_ZN4Foam6divideINS_12fvPatchFieldENS_7volMeshEEEvRNS_14GeometricFieldIdT_T0_EERKS6_S9_+0xd8) [0x7fbdc7d465a8]
[lws16:21852] [ 5] /home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so(_ZN4FoamdvINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_SA_+0x214) [0x7fbdc7d52e74]
[lws16:21852] [ 6] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN11parserField26FieldValueExpressionParser5parseEv+0x6e5d) [0x7fbdc66a9fcd]
[lws16:21852] [ 7] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam26FieldValueExpressionDriver5parseERKSs+0x5d) [0x7fbdc67b3f9d]
[lws16:21852] [ 8] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam27CommonValueExpressionDriver16evaluateVariableERKNS_4wordERKNS_6stringE+0x22) [0x7fbdc67a1b72]
[lws16:21852] [ 9] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam27CommonValueExpressionDriver12addVariablesERKNS_6stringEb+0x481) [0x7fbdc67a37c1]
[lws16:21852] [10] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so(_ZN4Foam27CommonValueExpressionDriver12addVariablesERKNS_4ListINS_6stringEEEb+0x39) [0x7fbdc67a3cd9]
[lws16:21852] [11] /home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswakSourceFields.so(_ZN4Foam16expressionSourceIdEclEv+0x2d) [0x7fbdc642172d]
[lws16:21852] [12] chtMultiRegionFoamMF [0x44c8e9]
[lws16:21852] [13] /lib/libc.so.6(__libc_start_main+0xe6) [0x7fbdc50fe5a6]
[lws16:21852] [14] chtMultiRegionFoamMF [0x423dd9]
[lws16:21852] *** End of error message ***
ccDPOpt/chtMultiRegionFoamMF"
[3] #13  __libc_start_main--------------------------------------------------------------------------
mpirun noticed that process rank 2 with PID 21853 on node lws16 exited on signal 8 (Floating point exception).
--------------------------------------------------------------------------
mabinty is offline   Reply With Quote

Old   April 3, 2011, 07:07
Default
  #65
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 mabinty View Post
Dear all,

I m experiencing a problem with the division operator "/". Any time i use it to define a heat source the simulations crashes. The expression looks like:

Code:
variables    "Xmin=-0.15;Ymin=0.0;Zmin=-0.15;Xmax=0.15;Ymax=0.3;Zmax=0.15;power=27000;V=(Xmax-Xmin)*(Ymax-Ymin)*(Zmax-Zmin);powerDens=power/V;";
I tried various possibilities but I always get a similar error message (see below) except when using a numerical value in the denominator, e.g. powerDens=power/0.027. I use OF 1.6.x, bison 2.4 and flex 2.5.35.

Thanks in advance for your help!
Aram
Hm. That should work. The stack-trace you posted is from a parallel run. Does this also happen in a serial run (that would help me to tell what the problem is). A little bug-report at the Mantis mentioned in the first post of this thread would also help me to not forget to look into it

Bernhard
gschaider is offline   Reply With Quote

Old   April 4, 2011, 05:25
Default
  #66
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
Hi Bernhard!

The problem occurs also in single runs (see error message below). I currently face some troubles with my sourceforge account but as soon as i resolve it i report the bug on Mantis.

Thanks for your help!

Aram

Code:
Solving for fluid region air
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Ux, Initial residual = 9.40997e-28, Final residual = 9.40997e-28, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 1.10761e-05, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 7.29066e-12, Final residual = 7.29066e-12, No Iterations 0
#0  Foam::error::printStack(Foam::Ostream&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  ?? in "/lib/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libOpenFOAM.so"
#4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/aa/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#6  parserField::FieldValueExpressionParser::parse() in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
#7  Foam::FieldValueExpressionDriver::parse(std::string const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
#8  Foam::CommonValueExpressionDriver::evaluateVariable(Foam::word const&, Foam::string const&) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
#9  Foam::CommonValueExpressionDriver::addVariables(Foam::string const&, bool) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
#10  Foam::CommonValueExpressionDriver::addVariables(Foam::List<Foam::string> const&, bool) in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswak4FoamParsers.so"
#11  Foam::expressionSource<double>::operator()() in "/home/aa/OpenFOAM/aa-1.6.x/lib/linux64GccDPOpt/libswakSourceFields.so"
#12  main in "/home/aa/OpenFOAM/aa-1.6.x/applications/bin/linux64GccDPOpt/chtMultiRegionFoamMF"
#13  __libc_start_main in "/lib/libc.so.6"
#14  _start at /build/buildd/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
mabinty is offline   Reply With Quote

Old   April 7, 2011, 08:11
Default expression syntax , funkysetfields to groovybc
  #67
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Hello

I would like to apply this BC in the inlet of my domain and update every iteration because it is moving.

So;
"average((fpos().y + surf(0.5) * fproj().y) < (surf(0.)) ? surf(1.0) : ((fpos().y - surf(0.5) * fproj().y) > surf(0.0) ? surf(0.0) : (surf(0.5) - fpos().y / (fproj().y + surf(0.00000001)))))"

is it possible to translate to groobybc??, i can not find in groovybc fproj and surf functions.

Advanced thanks
pablodecastillo is offline   Reply With Quote

Old   April 7, 2011, 10:12
Default
  #68
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 pablodecastillo View Post
Hello

I would like to apply this BC in the inlet of my domain and update every iteration because it is moving.

So;
"average((fpos().y + surf(0.5) * fproj().y) < (surf(0.)) ? surf(1.0) : ((fpos().y - surf(0.5) * fproj().y) > surf(0.0) ? surf(0.0) : (surf(0.5) - fpos().y / (fproj().y + surf(0.00000001)))))"

is it possible to translate to groobybc??, i can not find in groovybc fproj and surf functions.

Advanced thanks
Reason is that on a patch you only have faces (no cells). Therefore by definition all values are surf (no need for that function). Also pos IS the fpos. The only thing that might be missing is fproj. Maybe for a first try you can do without it. Or you can use pts and toFace/toPoint to achieve something similar (have a look at the groovyBC-docu)
gschaider is offline   Reply With Quote

Old   April 7, 2011, 10:50
Default
  #69
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Thanks,

It should be something like this;

inlet
{
type groovyBC;
variables "yp=pts().y;minY=min(yp);maxY=max(yp);proj_y=m axY-minY;";
valueExpression "(pos().y + 0.5 * proj_y) < 0.0 ? 1.0 : (pos().y - 0.5 * proj_y) > 0.0 ? 0.0 : (0.5 - pos().y / proj_y)";
value uniform (0 0 0);
}


right?
pablodecastillo is offline   Reply With Quote

Old   April 7, 2011, 11:21
Default
  #70
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 pablodecastillo View Post
Thanks,

It should be something like this;

inlet
{
type groovyBC;
variables "yp=pts().y;minY=min(yp);maxY=max(yp);proj_y=m axY-minY;";
valueExpression "(pos().y + 0.5 * proj_y) < 0.0 ? 1.0 : (pos().y - 0.5 * proj_y) > 0.0 ? 0.0 : (0.5 - pos().y / proj_y)";
value uniform (0 0 0);
}


right?
I'm afraid proj is not equivalent to the projection you'd like to have (the one fproj calculated). To rebuild this using existing functionality is not as trivial as I thought (that's why it was built into funky in the first place) - but I havn'T looked at your expression. Use replayTransientBC to see if it "looks right"

Other suggestions:

a. Live with a jagged interface at the inlet
b. Try combinations of pos() and toFace(pts()) to get a blurred edge
c. Use the expressionField-function object to get a field with the fproj() at every time-step and use the in your expression (not sure whehter this works correctly because the field you get will be a volumeField)
d. Write a bug-report asking for fproj for patches and hope that it gets done in the next few weeks
gschaider is offline   Reply With Quote

Old   April 7, 2011, 18:47
Default
  #71
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Hello Bernhard,

You are right, it is not working. When calculate minY and maxY, it is doing for all the inlet. I thought that would take just points for every face.

I will try to think another thing, if i can not find a easy solution, it will be better create a new BC.

Thanks
pablodecastillo is offline   Reply With Quote

Old   April 7, 2011, 19:38
Default
  #72
Senior Member
 
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17
pablodecastillo is on a distinguished road
Hi again,

pts is defined like pts Vector field with the vertices.

So how can i known how many vertices has the Face, and his coordinates?

Thanks.
pablodecastillo is offline   Reply With Quote

Old   April 8, 2011, 06:24
Default
  #73
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 pablodecastillo View Post
Hi again,

pts is defined like pts Vector field with the vertices.

So how can i known how many vertices has the Face, and his coordinates?

Thanks.
Not with groovyBC. Sorry. That would add way too much complexity to the parser and if that kind of information is needed then programming the BC in C++ is almost the same effort (its hard to process that kind of information without loops anyway)
gschaider is offline   Reply With Quote

Old   April 11, 2011, 23:18
Default
  #74
New Member
 
Join Date: Oct 2010
Posts: 27
Rep Power: 16
albem is on a distinguished road
Could you please post your file?

Quote:
Originally Posted by xisto View Post
I already use both.

funkySetFields and funkySetBoundaryFilelds

And it works for me.

Excellent tool.

Thanks.

Carlos
albem is offline   Reply With Quote

Old   May 6, 2011, 14:06
Default
  #75
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
dear all!

I m using swal4Foam in a multi region case where I introduced (like shown in the example InterFoamWithSources) a heat source in one of the regions, i.e air, by defining the heatSourceDict as follows:

Code:
variables "Xmin=-0.15;Ymin=0.0;Zmin=-0.15;Xmax=0.15;Ymax=0.3;Zmax=0.15;powerDens=1.0e06;"; //= 27e3/0.3^3 W/m3

expression   "(pos().x>=Xmin && pos().x<=Xmax && pos().y>=Ymin && pos().y<=Ymax && pos().z >= Zmin && pos().z <= Zmax) ? powerDens : 0";

dimensions   [1 -1 -3 0 0 0 0];
That work quite well. Now I want to extend the domain of the heat source by establishing a cellSet "heatSource" in the considered region air and use the following heatSourceDict:

Code:
variables "powerDens=1.0e06;"; //= 27e3/0.3^3 W/m3

expression   "set(heatSource) ? powerDens : 0";

dimensions   [1 -1 -3 0 0 0 0];
My main problem now is how to create a cellSet "heatSource" in the region air applying the cellRegionAddressing of the corresponding region. I tried to use:

Code:
setSet -batch makeCellSets.heatSource -region air
where makeCellSets.heatSource defines the desired cellSet "heatSource", after establishing the region air. The utility produces a cellSet constant/air/polyMesh/sets/heatSource but when I let the solver run I get the following message in the log file:

Code:
Solving for fluid region air
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.000182075, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.000208165, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.000173218, No Iterations 1
No set "heatSource" at t=0.1 falling back to 'constant'
and when I visualize the heatSource in paraview the location doesn t correspond to the one defined by the makeCellSets.heatSource file.

Does anybody have an idea how to solve this problem??

Appreciate your comments!

Aram
mabinty is offline   Reply With Quote

Old   May 7, 2011, 20:00
Default Setting up swak4Foam on Ubuntu
  #76
New Member
 
lazio
Join Date: Apr 2010
Posts: 22
Rep Power: 16
lrunber is on a distinguished road
Hi All,
I have been trying to set up swak4Foam on ubuntu 11.04. This is what I have done:
Installed packages:
swak4foam-openfoam-1.6-ext
swak4foam-openfoam-1.6-ext-dev

Next I wanted to compile InterFoamWithSources, I changed the these lines in ./Make/options, according to where the packages where installed
from:
Code:
    -I../../../Libraries/swak4FoamParsers/lnInclude \
    -I../../../Libraries/swakFiniteArea/lnInclude
to:
Code:
    -I$(LIB_SRC)/swak4Foam/swak4FoamParsers/lnInclude \
    -I$(LIB_SRC)/swak4Foam/swakSourceFields/lnInclude
now when I run wmake:
Code:
Making dependency list for source file interFoamWithSources.C
SOURCE=interFoamWithSources.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels/incompressible/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels/interfaceProperties/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/turbulenceModels/incompressible/turbulenceModel -I/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swak4FoamParsers/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swakSourceFields/lnInclude -IlnInclude -I. -I/usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/interFoamWithSources.o
In file included from /usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swak4FoamParsers/lnInclude/FieldValueExpressionParser_location.hh:44:0,
                 from FieldValueExpressionParser.tab.hh:65,
                 from /usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18,
                 from /usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swakSourceFields/lnInclude/expressionSource.H:45,
                 from interFoamWithSources.C:48:
position.hh: In function ‘bool parserField::operator==(const parserField::position&, const parserField::position&)’:
position.hh:136:69: warning: suggest parentheses around ‘&&’ within ‘||’
In file included from interFoamWithSources.C:60:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:134:5: error: invalid initialization of reference of type ‘const Foam::dictionary&’ from expression of type ‘Foam::volScalarField’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/findRefCell.H:50:6: error: in passing argument 2 of ‘void Foam::setRefCell(const Foam::volScalarField&, const Foam::dictionary&, Foam::label&, Foam::scalar&, bool)’
In file included from interFoamWithSources.C:91:0:
pEqn.H:34:23: error: ‘struct Foam::volScalarField’ has no member named ‘select’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nCorr’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:8:10: warning: unused variable ‘momentumPredictor’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’
make: *** [Make/linux64GccDPOpt/interFoamWithSources.o] Error 1
Could someone please help put this fool out of his misery
lrunber is offline   Reply With Quote

Old   May 9, 2011, 05:42
Default
  #77
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 lrunber View Post
Hi All,
I have been trying to set up swak4Foam on ubuntu 11.04. This is what I have done:
Installed packages:
swak4foam-openfoam-1.6-ext
swak4foam-openfoam-1.6-ext-dev

Next I wanted to compile InterFoamWithSources, I changed the these lines in ./Make/options, according to where the packages where installed
from:
Code:
    -I../../../Libraries/swak4FoamParsers/lnInclude \
    -I../../../Libraries/swakFiniteArea/lnInclude
to:
Code:
    -I$(LIB_SRC)/swak4Foam/swak4FoamParsers/lnInclude \
    -I$(LIB_SRC)/swak4Foam/swakSourceFields/lnInclude
now when I run wmake:
Code:
Making dependency list for source file interFoamWithSources.C
SOURCE=interFoamWithSources.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels/incompressible/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/transportModels/interfaceProperties/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/turbulenceModels/incompressible/turbulenceModel -I/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swak4FoamParsers/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swakSourceFields/lnInclude -IlnInclude -I. -I/usr/lib/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude -I/usr/lib/OpenFOAM-1.6-ext/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/interFoamWithSources.o
In file included from /usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swak4FoamParsers/lnInclude/FieldValueExpressionParser_location.hh:44:0,
                 from FieldValueExpressionParser.tab.hh:65,
                 from /usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18,
                 from /usr/lib/OpenFOAM-1.6-ext/src/swak4Foam/swakSourceFields/lnInclude/expressionSource.H:45,
                 from interFoamWithSources.C:48:
position.hh: In function ‘bool parserField::operator==(const parserField::position&, const parserField::position&)’:
position.hh:136:69: warning: suggest parentheses around ‘&&’ within ‘||’
In file included from interFoamWithSources.C:60:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:134:5: error: invalid initialization of reference of type ‘const Foam::dictionary&’ from expression of type ‘Foam::volScalarField’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/findRefCell.H:50:6: error: in passing argument 2 of ‘void Foam::setRefCell(const Foam::volScalarField&, const Foam::dictionary&, Foam::label&, Foam::scalar&, bool)’
In file included from interFoamWithSources.C:91:0:
pEqn.H:34:23: error: ‘struct Foam::volScalarField’ has no member named ‘select’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nCorr’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:8:10: warning: unused variable ‘momentumPredictor’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:11:10: warning: unused variable ‘transonic’
/usr/lib/OpenFOAM-1.6-ext/src/finiteVolume/lnInclude/readPISOControls.H:14:9: warning: unused variable ‘nOuterCorr’
make: *** [Make/linux64GccDPOpt/interFoamWithSources.o] Error 1
Could someone please help put this fool out of his misery
The problem is that the include paths "-I../../ ..." assume that the example is in the same source tree as the Library sources. With the debian package this is not the case I'm afraid. There are two possible workarounds:
- Use some symbolic links to "emulate" an environment where the Headers ARE in ../..
- Modify Make/options so that -I points to the actual place of the headers (I believe the dev package installs them into $FOAM_SRC)

Sorry for the mixup but I'm not using Debian/Ubuntu myself. If anyone fells like maintaining the Debian-packaging he's more than welcome.
gschaider is offline   Reply With Quote

Old   May 9, 2011, 05:47
Default
  #78
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 gschaider View Post
The problem is that the include paths "-I../../ ..." assume that the example is in the same source tree as the Library sources. With the debian package this is not the case I'm afraid. There are two possible workarounds:
- Use some symbolic links to "emulate" an environment where the Headers ARE in ../..
- Modify Make/options so that -I points to the actual place of the headers (I believe the dev package installs them into $FOAM_SRC)

Sorry for the mixup but I'm not using Debian/Ubuntu myself. If anyone fells like maintaining the Debian-packaging he's more than welcome.
Sorry. My bad. You already did this and the problem you have is something different. InterFoam changed a bit in the last time. The example solver was based on 1.7 which is slighly incompatible with 1.6. The best guess would be to take the sources of the original 1.6 solver and put in the 4 or 5 lines that are needed for the sources.
gschaider is offline   Reply With Quote

Old   May 9, 2011, 05:52
Default
  #79
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 mabinty View Post
dear all!

I m using swal4Foam in a multi region case where I introduced (like shown in the example InterFoamWithSources) a heat source in one of the regions, i.e air, by defining the heatSourceDict as follows:

Code:
variables "Xmin=-0.15;Ymin=0.0;Zmin=-0.15;Xmax=0.15;Ymax=0.3;Zmax=0.15;powerDens=1.0e06;"; //= 27e3/0.3^3 W/m3

expression   "(pos().x>=Xmin && pos().x<=Xmax && pos().y>=Ymin && pos().y<=Ymax && pos().z >= Zmin && pos().z <= Zmax) ? powerDens : 0";

dimensions   [1 -1 -3 0 0 0 0];
That work quite well. Now I want to extend the domain of the heat source by establishing a cellSet "heatSource" in the considered region air and use the following heatSourceDict:

Code:
variables "powerDens=1.0e06;"; //= 27e3/0.3^3 W/m3

expression   "set(heatSource) ? powerDens : 0";

dimensions   [1 -1 -3 0 0 0 0];
My main problem now is how to create a cellSet "heatSource" in the region air applying the cellRegionAddressing of the corresponding region. I tried to use:

Code:
setSet -batch makeCellSets.heatSource -region air
where makeCellSets.heatSource defines the desired cellSet "heatSource", after establishing the region air. The utility produces a cellSet constant/air/polyMesh/sets/heatSource but when I let the solver run I get the following message in the log file:

Code:
Solving for fluid region air
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.000182075, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.000208165, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.000173218, No Iterations 1
No set "heatSource" at t=0.1 falling back to 'constant'
and when I visualize the heatSource in paraview the location doesn t correspond to the one defined by the makeCellSets.heatSource file.

Does anybody have an idea how to solve this problem??

Appreciate your comments!

Aram
The message you highlighted is not the problem. It just says "because I'm at t=0.1 I had a look in 0.1/air/polyMesh/sets and the cell set wasn't there so I'm going for the one in constant" which is actually what you want anyway.

About the headSource being in the wrong place I have no idea. Have you tried to visualize it without using swak? Either in paraFoam (I think that supports sets) or if you're using the native reader (I think that only supports zones) by converting it with setsToZones. If THAT is in the right place then it is a swak-problem otherwise I'd guess it is a problem with the setup
gschaider is offline   Reply With Quote

Old   May 9, 2011, 09:10
Default
  #80
New Member
 
lazio
Join Date: Apr 2010
Posts: 22
Rep Power: 16
lrunber is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Sorry. My bad. You already did this and the problem you have is something different. InterFoam changed a bit in the last time. The example solver was based on 1.7 which is slighly incompatible with 1.6. The best guess would be to take the sources of the original 1.6 solver and put in the 4 or 5 lines that are needed for the sources.
Thanks, I see the problem was the example solver based on 1.7. I have 1.7 installed so I copied the /usr/lib/OpenFOAM-1.6-ext/src/swak4Foam to /opt/openfoam171/src and ran Allclean & Allwmake.
Now InterFoamWithSources compiles fine, however, the utilities e.g. funkySetFields are only in the 1.6-ext bin, and since the src was not included in the ubuntu packages I proceeded to:

DL the utilities from: https://openfoam-extend.svn.sourcefo...oam/Utilities/
and proceed to paste into: /opt/openfoam171/applications/utilities/swak4Foam
After running wmake on the utilities (had to change /Make/options as in previous post), I can succesfully run mixingThing case.

Thanks for the great programs
lrunber is offline   Reply With Quote

Reply


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 11:53.