|
[Sponsors] |
[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
March 25, 2011, 04:09 |
fpos in funkySetFields
|
#1 |
Senior Member
|
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. |
|
March 25, 2011, 07:10 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
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 |
||
March 25, 2011, 07:39 |
|
#3 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
March 26, 2011, 05:19 |
|
#4 |
Senior Member
|
Thanks, Bernhard. That fixed my problem!!
|
|
March 29, 2011, 06:44 |
|
#5 |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17 |
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;"; 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). -------------------------------------------------------------------------- |
|
April 3, 2011, 06:07 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
April 4, 2011, 04:25 |
|
#7 |
Senior Member
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17 |
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 |
|
April 7, 2011, 07:11 |
expression syntax , funkysetfields to groovybc
|
#8 |
Senior Member
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
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 |
|
April 7, 2011, 09:12 |
|
#9 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
April 7, 2011, 09:50 |
|
#10 |
Senior Member
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
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? |
|
April 7, 2011, 10:21 |
|
#11 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
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 |
||
April 7, 2011, 17:47 |
|
#12 |
Senior Member
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
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 |
|
April 7, 2011, 18:38 |
|
#13 |
Senior Member
Pablo
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
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. |
|
April 8, 2011, 05:24 |
|
#14 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
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)
|
|
|
|