# Introduce a drag model

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 February 27, 2012, 01:15 Introduce a drag model #1 Member   Jeong Kim Join Date: Feb 2010 Posts: 42 Rep Power: 8 I wanted to introduce a drag model call "Tam" into the twoPhaseEulerFoam solver in OF v1.7.1. However, the solver made a complain. I added Tam.C to "files" located at the following folder. Please let me know what mistakes I did in Tam.C. "run/multiphase/twoPhaseEulerFoamMod/interfacialModels/Make/" ====Tam.C======== ... // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp Foam::Tam::K ( const volScalarField& Ur ) const { volScalarField beta = max(scalar(1) - alpha_, scalar(1.0e-6)); forAll(alpha_, celli) { if(alpha_[celli] > 0.6666) { functAlpha[celli] = 1.0e6; } } return 4.5/(beta*alpha_ + scalar(1.0e-6))*phaseb_.nu()/pow(phasea_.d(),2.0)*functAlpha; } ================ Below is what I see on my screen. ===== .... Time = 0.002 DILUPBiCG: Solving for alpha, Initial residual = 0.0021426, Final residual = 5.45235e-12, No Iterations 3 Dispersed phase volume fraction = 0.36753 Min(alpha) = -0.0272179 Max(alpha) = 1.00084 DILUPBiCG: Solving for alpha, Initial residual = 8.90552e-05, Final residual = 1.62296e-12, No Iterations 3 Dispersed phase volume fraction = 0.36753 Min(alpha) = -0.0291739 Max(alpha) = 1.00075 #0 Foam::error:rintStack(Foam::Ostream&) in "/home/jeong/OpenFOAM/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/jeong/OpenFOAM/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::sqrt(Foam::Field&, Foam::UList const&) in "/home/jeong/OpenFOAM/openfoam171/lib/linuxGccDPOpt/libOpenFOAM.so" #4 Foam::tmp > Foam::sqrt(Foam::tmp > const&) in "/home/jeong/OpenFOAM/openfoam171/lib/linuxGccDPOpt/libEulerianInterfacialModels.so" #5 Foam::Tam::K(Foam::GeometricField const&) const in "/home/jeong/OpenFOAM/openfoam171/lib/linuxGccDPOpt/libEulerianInterfacialModels.so" #6 in "/home/jeong/OpenFOAM/openfoam171/applications/bin/linuxGccDPOpt/twoPhaseEulerFoamMod" #7 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #8 in "/home/jeong/OpenFOAM/openfoam171/applications/bin/linuxGccDPOpt/twoPhaseEulerFoamMod" Floating point exception =====

 February 29, 2012, 10:46 #2 Member   Laurens Van Dyck Join Date: Jul 2011 Location: Netherlands/Germany Posts: 34 Rep Power: 7 There is somewhere an error in calculating a square root. I suppose the value of K becomes negative in your calculation. Double check your formula or consider bounding the value of K: max(SMALL,4.5/...) Edit: You can see that your minimum volume fraction is negative (Min(alpha) = -0.0272179), This is not physical but if it works with everything else I would replace all 'alpha' in your code with 'alphaBounded' and add above: volScalarField alphaBounded = min(1.0,max(0.0,alpha));

 February 29, 2012, 21:19 #3 Member   Jeong Kim Join Date: Feb 2010 Posts: 42 Rep Power: 8 Thank you for your comment.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post impecca OpenFOAM Running, Solving & CFD 4 December 20, 2013 11:36 mukut Phoenics 2 January 9, 2010 19:07 Yasmail AKARIOUH FLUENT 0 April 29, 2008 07:44 Anant CFX 1 February 4, 2008 05:18 gregorv OpenFOAM Running, Solving & CFD 4 December 4, 2007 14:25

All times are GMT -4. The time now is 04:06.

 Contact Us - CFD Online - Top