CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with variable viscosity/alphatwallfunction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2015, 06:11
Default Problem with variable viscosity/alphatwallfunction
  #1
New Member
 
Luuk Buijs
Join Date: Mar 2015
Posts: 19
Rep Power: 11
lcbuijs is on a distinguished road
Hi dear Foamers,

Lately I've been consistently running into an error with a specific case I'm running. I'm using a slightly adapted version of buoyantBoussinesqPimpleFoam to simulate RB-convection in a cubical cavity. The adaptations I've made are:
  • Add a viscosity model for variable viscosity depending on temperature
  • Add variation with temperature of thermal diffusivity and thermal expansion, which I've set to a constant for the time being
For clarity, I'm not using any turbulence models and for now I'm only taking into account variations of viscosity as a T-dependent polynomial, even though the other functionality changes seem to be working properly.

Now, the problem I'm facing is that I'm consistently getting the following error for one specific case:
Code:
[0] #0  Foam::error::printStack(Foam::Ostream&) in "/opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #1  Foam::sigFpe::sigHandler(int) in "/opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
[0] #2
[0]  at sigaction.c:0
[0] #3  Foam::incompressible::alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() in "/opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
[0] #4  Foam::fvPatchField<double>::evaluate(Foam::UPstream::commsTypes) in "/home00/lbuys/OpenFOAM/lbuys-2.3.0/platforms/linux64GccDPOpt/bin/myBBPF"
[0] #5  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/home00/lbuys/OpenFOAM/lbuys-2.3.0/platforms/linux64GccDPOpt/bin/myBBPF"
[0] #6
[0]  in "/home00/lbuys/OpenFOAM/lbuys-2.3.0/platforms/linux64GccDPOpt/bin/myBBPF"
[0] #7  __libc_start_main in "/lib64/libc.so.6"
[0] #8
[0]  in "/home00/lbuys/OpenFOAM/lbuys-2.3.0/platforms/linux64GccDPOpt/bin/myBBPF"
[dutw12229:19548] *** Process received signal ***
[dutw12229:19548] Signal: Floating point exception (8)
[dutw12229:19548] Signal code:  (-6)
[dutw12229:19548] Failing at address: 0x50c00004c5c
[dutw12229:19548] [ 0] /lib64/libc.so.6() [0x3e2fc326a0]
[dutw12229:19548] [ 1] /lib64/libc.so.6(gsignal+0x35) [0x3e2fc32625]
[dutw12229:19548] [ 2] /lib64/libc.so.6() [0x3e2fc326a0]
[dutw12229:19548] [ 3] /opt/apps/openfoam-2.3.0/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so(_ZN4Foam14incompressible47alphatJayatillekeWallFunctionFvPatchScalarField12updateCoeffsEv+0x233) [0x2b1005e94753]
[dutw12229:19548] [ 4] myBBPF(_ZN4Foam12fvPatchFieldIdE8evaluateENS_8UPstream10commsTypesE+0x10) [0x42f7a0]
[dutw12229:19548] [ 5] myBBPF(_ZN4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volMeshEE22GeometricBoundaryField8evaluateEv+0x1ab) [0x44485b]
[dutw12229:19548] [ 6] myBBPF() [0x42a3b5]
[dutw12229:19548] [ 7] /lib64/libc.so.6(__libc_start_main+0xfd) [0x3e2fc1ed5d]
[dutw12229:19548] [ 8] myBBPF() [0x4273e9]
[dutw12229:19548] *** End of error message ***
The confusing part being that any of my cases with the exact same functionality and slightly different boundary conditions, and also the cases with the same boundary conditions but variation of for example expasion coefficient instead of viscosity, all seem to be working properly. I've even gotten the exact same case at a slightly higher resolution to work, only this very specific case keeps on getting stuck after ~100 iterations.

Any ideas/suggestions for where to look?

Many thanks!
lcbuijs is offline   Reply With Quote

Old   June 8, 2015, 08:16
Default
  #2
New Member
 
Luuk Buijs
Join Date: Mar 2015
Posts: 19
Rep Power: 11
lcbuijs is on a distinguished road
Oh well, I've simply set the alphat boundary condition to a fixed value. That seems to solve the problem so far.
lcbuijs is offline   Reply With Quote

Old   June 19, 2015, 10:31
Default
  #3
New Member
 
Join Date: Aug 2010
Posts: 1
Rep Power: 0
celez1010 is on a distinguished road
The error comes from the member function "alphatJayatillekeWallFunctionFvPatchScalarField:: updateCoeffs()"
used in the boundary condition "alphatJayatillekeWallFunction" that you assigned for the turbulent thermal diffusivity alphat.

This boundary condition can be surely used when using wall functions but I am not sure if it's ok also for low-Re simulations. What type of simulation are you doing?

In "updateCoeffs()" the code uses the viscosity and the Prandlt number to compute the thermal diffusivity therefore I think your problem is related to how/where you compute the temperature dependent viscosity (and/or how you changed the code to include a temperature dependent thermal diffusivity).

Also setting a constant value might not be a good solution (it could be an error) since your viscosity (and thermal diffusivity) change with temperature.

Hope this can help.
celez1010 is offline   Reply With Quote

Old   June 19, 2015, 11:04
Default
  #4
New Member
 
Luuk Buijs
Join Date: Mar 2015
Posts: 19
Rep Power: 11
lcbuijs is on a distinguished road
Quote:
Originally Posted by celez1010 View Post
The error comes from the member function "alphatJayatillekeWallFunctionFvPatchScalarField:: updateCoeffs()"
used in the boundary condition "alphatJayatillekeWallFunction" that you assigned for the turbulent thermal diffusivity alphat.

This boundary condition can be surely used when using wall functions but I am not sure if it's ok also for low-Re simulations. What type of simulation are you doing?

In "updateCoeffs()" the code uses the viscosity and the Prandlt number to compute the thermal diffusivity therefore I think your problem is related to how/where you compute the temperature dependent viscosity (and/or how you changed the code to include a temperature dependent thermal diffusivity).

Also setting a constant value might not be a good solution (it could be an error) since your viscosity (and thermal diffusivity) change with temperature.

Hope this can help.
Thank you for your reply!

I found the problem to be that I manually implemented a value for alpha, while still calculating these wall functions for alphat. I switched that off by using fixedValue (since I'm not using turbulence modelling anyway) and that fixed the problem.
lcbuijs 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] OpenFOAM Installation for navalFoam sachinlb OpenFOAM Community Contributions 22 July 28, 2017 05:26
[swak4Foam] Variable T_inf for convection problem in a pipe using groovyBC Mojtaba.a OpenFOAM Community Contributions 4 September 4, 2013 19:10
Problem with variable in expression CFX-Pre TallesC CFX 4 March 7, 2013 17:32
A realy easy variable - problem wernsen OpenFOAM Programming & Development 3 January 7, 2013 13:25
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 20:09


All times are GMT -4. The time now is 13:45.