|
[Sponsors] |
[swak4Foam] groovyBC elevated inlet. pos() issue |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 22, 2011, 07:37 |
groovyBC elevated inlet. pos() issue
|
#1 |
Member
Join Date: Nov 2010
Posts: 41
Rep Power: 15 |
I've got an issue with groovyBC. It makes my run crash instantly. I'm using twoPhaseEulerFoam and I have an elevated inlet (see pic), the inlet is above a wall. I want to put a logarithmic velocity profile onto that inlet. I've implemented it in groovy heres the code.
Code:
myinlet { type groovyBC; variables "u_f=0.0239;z0=0.0000333;K=0.41;vel=(u_f/K)*log((pos().z)/z0)*normal();"; valueExpression "-vel"; } This works, if the inlet goes from the bottom to the top, however it seems that when it is elevated then there is an issue with pos().z, it makes my run crash instantly with this error. When i take pos().z out, it works again, so it is not a problem with groovyBC as such. I know i need to account for pos().z not starting at zero for my profile but it should nevertheless work? Code:
Starting time loop Courant Number mean: 0 max: 0 Max Ur Courant Number = 0 deltaT = 0.000598802 Reading/calculating field UaMean Reading/calculating field UbMean Reading/calculating field alphaMean Reading/calculating field pMean fieldAverage: starting averaging at time 0 Time = 0.000598802 DILUPBiCG: Solving for alpha, Initial residual = 1.48592e-17, Final residual = 1.48592e-17, No Iterations 0 Dispersed phase volume fraction = 0.135285 Min(alpha) = 0 Max(alpha) = 0.6 DILUPBiCG: Solving for alpha, Initial residual = 1.48592e-17, Final residual = 1.48592e-17, No Iterations 0 Dispersed phase volume fraction = 0.135285 Min(alpha) = 0 Max(alpha) = 0.6 #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 in "/lib/libm.so.6" #4 log in "/lib/libm.so.6" #5 Foam::log(Foam::Field<double>&, Foam::UList<double> const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so" #6 Foam::log(Foam::UList<double> const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so" #7 parserPatch::PatchValueExpressionParser::parse() in "/home/gjm1v07/OpenFOAM/gjm1v07-1.7.1/lib/linux64GccDPOpt/libswak4FoamParsers.so" #8 Foam::PatchValueExpressionDriver::parse(std::string const&) in "/home/gjm1v07/OpenFOAM/gjm1v07-1.7.1/lib/linux64GccDPOpt/libswak4FoamParsers.so" #9 Foam::CommonValueExpressionDriver::evaluateVariable(Foam::word const&, Foam::string const&) in "/home/gjm1v07/OpenFOAM/gjm1v07-1.7.1/lib/linux64GccDPOpt/libswak4FoamParsers.so" #10 Foam::CommonValueExpressionDriver::addVariables(Foam::string const&, bool) in "/home/gjm1v07/OpenFOAM/gjm1v07-1.7.1/lib/linux64GccDPOpt/libswak4FoamParsers.so" #11 Foam::CommonValueExpressionDriver::addVariables(Foam::List<Foam::string> const&, bool) in "/home/gjm1v07/OpenFOAM/gjm1v07-1.7.1/lib/linux64GccDPOpt/libswak4FoamParsers.so" #12 Foam::groovyBCFvPatchField<Foam::Vector<double> >::updateCoeffs() in "/home/gjm1v07/OpenFOAM/gjm1v07-1.7.1/lib/linux64GccDPOpt/libgroovyBC.so" #13 Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensionSet const&) in "/opt/openfoam171/applications/bin/linux64GccDPOpt/twoPhaseEulerFoam" #14 in "/opt/openfoam171/applications/bin/linux64GccDPOpt/twoPhaseEulerFoam" #15 __libc_start_main in "/lib/libc.so.6" #16 in "/opt/openfoam171/applications/bin/linux64GccDPOpt/twoPhaseEulerFoam" Floating point exception |
|
June 23, 2011, 00:11 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
June 23, 2011, 04:53 |
|
#3 |
Member
Join Date: Nov 2010
Posts: 41
Rep Power: 15 |
Thanks Bernhard. I get it.
|
|
January 23, 2013, 07:56 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear bernhard
How can i unset FOAM_SIGFPE to find where NANs are occuring? Thanks. |
|
January 23, 2013, 08:02 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
another question occured! At my case that is similar to what Greg said i have set pos().y=0 at starting.i don't figure out it.does it have any problem?why?
|
|
January 23, 2013, 09:11 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
unset FOAM_SIGFPE But that only makes the solver run and calculate garbage. Doubt that this will help you much
__________________
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 |
||
January 23, 2013, 09:14 |
|
#7 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
PLEASE be more specific. One can only GUESS what you mean. Of course pos().y==0 can be a problem. For instance if you calculate the logarithm of it
__________________
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 |
|
Tags |
groovybc, twophaseeulerfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure Inlet VS velocity Inlet difference | Mohsin | FLUENT | 9 | January 4, 2021 11:34 |
Problem with assigned inlet velocity profile as a boundary condition | Ozgur_ | FLUENT | 5 | August 25, 2015 05:58 |
[swak4Foam] groovyBC interFoam splitted inlet -- massflowrate | FerdiFuchs | OpenFOAM Community Contributions | 1 | October 1, 2014 08:51 |
Mass flow inlet and pressure outlet issue | nikhil | FLUENT | 5 | December 11, 2013 13:30 |
[swak4Foam] groovyBC, coupling inlet with velocity at specific point location | olivierG | OpenFOAM Community Contributions | 6 | June 23, 2012 09:44 |