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

Using power-law equations in driftFluxFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 21, 2016, 10:50
Post Using power-law equations in driftFluxFoam
  #1
New Member
 
Elena Valle
Join Date: Jul 2016
Posts: 3
Rep Power: 9
ElenaVM is on a distinguished road
Hello
I'm using driftFluxFoam to model a secondary settling tank. I want to use a power-law function, (V0, x and q are constants)

Udm_ = (rhoc_/rho())*V0_/(1 + Foam:: pow((alphad_/x_), q_));

but when I start the simulation I get this error

p { margin-bottom: 0.25cm; line-height: 120%; }a:link { } 0 Foam::error:: printStack(Foam::Ostream&) at ??:?
[5] #1 Foam::sigFpe::sigHandler(int) at ??:?
[5] #2 in "/lib/x86_64-linux-gnu/libc.so.6"
[5] #3 in "/lib/x86_64-linux-gnu/libm.so.6"
[5] #4 pow in "/lib/x86_64-linux-gnu/libm.so.6"
[5] #5 Foam:: pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) at ??:?
[5] #6 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:: pow<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::dimensioned<double> const&) at ??:?
[5] #7 Foam::relativeVelocityModels::diehl::correct() at ??:?
[5] #8
[5] at ??:?
[5] #9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[5] #10
[5] at ??:?
[julien-TERRA-PC:05300] *** Process received signal ***
[julien-TERRA-PC:05300] Signal: Floating point exception (8)
[julien-TERRA-PC:05300] Signal code: (-6)
[julien-TERRA-PC:05300] Failing at address: 0x3ea000014b4
[julien-TERRA-PC:05300] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7fca49befd40]
[julien-TERRA-PC:05300] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x39) [0x7fca49befcc9]
[julien-TERRA-PC:05300] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x36d40) [0x7fca49befd40]
[julien-TERRA-PC:05300] [ 3] /lib/x86_64-linux-gnu/libm.so.6(+0x15a95) [0x7fca4a1aaa95]
[julien-TERRA-PC:05300] [ 4] /lib/x86_64-linux-gnu/libm.so.6(pow+0x1c) [0x7fca4a1bb9ac]
[julien-TERRA-PC:05300] [ 5] /opt/openfoam231/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(_ZN4Foam3powERNS_5FieldIdEERKNS_5UL istIdEERKd+0x42) [0x7fca4aeb0e12]
[julien-TERRA-PC:05300] [ 6] /home/elenavalle/OpenFOAM/elenavalle-2.3.1/platforms/linux64GccDPOpt/lib/libdriftFluxRelativeVelocityModels.so(_ZN4Foam3pow INS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14Geom etricFieldIdT_T0_EEEERKS8_RKNS_11dimensionedIdEE+0 x176) [0x7fca4de6a656]
[julien-TERRA-PC:05300] [ 7] /home/elenavalle/OpenFOAM/elenavalle-2.3.1/platforms/linux64GccDPOpt/lib/libdriftFluxRelativeVelocityModels.so(_ZN4Foam22re lativeVelocityModels5diehl7correctEv+0x59) [0x7fca4de68db9]
[julien-TERRA-PC:05300] [ 8] diehldriftFluxFoam() [0x43bada]
[julien-TERRA-PC:05300] [ 9] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fca49bdaec5]
[julien-TERRA-PC:05300] [10] diehldriftFluxFoam() [0x440dbb]
[julien-TERRA-PC:05300] *** End of error message ***

Seeing some coments, this is a mathematical error because alphad_ turns into negative values (I do not know why).

So, can somebody help me, telling me how can I avoid this error?

Thank you so much
ElenaVM is offline   Reply With Quote

Old   March 10, 2017, 11:33
Default
  #2
New Member
 
Denys Wickens
Join Date: Jan 2017
Posts: 7
Rep Power: 9
DenysW is on a distinguished road
alpha_ routinely goes small and negative in driftFluxFoam. It looks like rounding errors due to the limited precision available in 'double' variables. To overcome this I used a temporary variable thus:

volScalarField X = sqrt(sqr(alpha_));

However, I also note your equation involves rho. Are you sure? As I look at slurry.C, driftFluxFoam uses mu not nu and applies a calculated mixture rho in the code that calls the selected transportModel.
DenysW is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Carreau-Yasuda, Generalized Power Law and Casson Viscosity Models Gespenster FLUENT 1 August 25, 2016 02:32
Non-Newtonian Power Law for Viscosity John FLUENT 16 September 12, 2015 06:18
Non-Newtonian Generalized Power Law VPassamai STAR-CCM+ 0 July 24, 2015 10:56
UDF for Non-Newtonian power law fluids Iman Sengupta Fluent UDF and Scheme Programming 1 July 14, 2015 15:20
Power law vs fixed coeff porosity models s1dev OpenFOAM Running, Solving & CFD 0 December 29, 2014 17:52


All times are GMT -4. The time now is 10:35.