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

[swak4Foam] groovyBC elevated inlet. pos() issue

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 22, 2011, 06:37
Default groovyBC elevated inlet. pos() issue
  #1
Member
 
Join Date: Nov 2010
Posts: 41
Rep Power: 15
grjmell is on a distinguished road
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
Attached Images
File Type: jpg mesh.jpg (66.7 KB, 44 views)
grjmell is offline   Reply With Quote

 

Tags
groovybc, twophaseeulerfoam


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pressure Inlet VS velocity Inlet difference Mohsin FLUENT 9 January 4, 2021 10:34
Problem with assigned inlet velocity profile as a boundary condition Ozgur_ FLUENT 5 August 25, 2015 04:58
[swak4Foam] groovyBC interFoam splitted inlet -- massflowrate FerdiFuchs OpenFOAM Community Contributions 1 October 1, 2014 07:51
Mass flow inlet and pressure outlet issue nikhil FLUENT 5 December 11, 2013 12:30
[swak4Foam] groovyBC, coupling inlet with velocity at specific point location olivierG OpenFOAM Community Contributions 6 June 23, 2012 08:44


All times are GMT -4. The time now is 16:12.