Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Transient Turbulent Flow K-Ep

Please login with a confirmed email address before reporting spam

I am trying to build a very very simple model that I can make more complicated later but I can not get it to work. My ultimate goal is to model a tubular reactor with a cooling jacket.

All I would like to do is get the chemical engineering module, turbulent K-Eps transient model to work, 2D axial symmetry.

Right now I just have a pipe of 16 cm radius flowing water (1000 kg/(m^3) and 0.00043 Pa s). I have an inlet at boundary 2 (velocity, 1m/s well into the turbulent regime,in z direction and 0 in r) and an outlet of pressure with p =0. These are opposite of each other in the drawing. If you just draw a rectangle they will be numbered correctly. The other two are walls with logarithmic functions h/2.

No matter what I do, solver changes, segregated or not nothing gives me a solution. I am using the initial value expression every time, in the solver parameter menu.

Segregated group X1

Attempt to evaluate real logarithm of negative number.
- Function: log
Failed to evaluate expression.
- Expression: d((((-rho_chns*Cmu_chns^0.25*exp(0.5*logk)*u/(log(abs(dwplus_chns))/kappa_chns+Cplus_chns)-nx_chns*p)*test(u))-(0))*(dvol),{test@1})

Exception:
com.femlab.jni.FlNativeException: Failed to evaluate expression
Messages:
Failed to evaluate expression
- Expression: d((((-rho_chns*Cmu_chns^0.25*exp(0.5*logk)*u/(log(abs(dwplus_chns))/kappa_chns+Cplus_chns)-nx_chns*p)*test(u))-(0))*(dvol),{test@0})

Log of negative
- Function: log

Segregated group X1


Stack trace:
at evaltree.cpp, row 866, ()
at evalfun_basic.cpp, row 491, ()
at segregsolver.cpp, row 990, ()
at com.femlab.solver.FlSolver.femTime(Native Method)
at com.femlab.solver.FemTime.run(Unknown Source)
at com.femlab.server.FlRunner.run(Unknown Source)
at com.femlab.util.i.run(Unknown Source)
at com.femlab.util.aa.run(Unknown Source)

X1 is what?

For the direct solver I get

Error: 6176
Attempt to evaluate real logarithm of negative number.
- Function: log
Failed to evaluate expression.
- Expression: d((((-rho_chns*Cmu_chns^0.25*exp(0.5*logk)*u/(log(abs(dwplus_chns))/kappa_chns+Cplus_chns)-nx_chns*p)*test(u))-(0))*(dvol),{test@1})


I get this error all the time, which makes me think it has to do with the sub-domain and initial conditions. Maybe with the logk and logd?

Can some one send me a basic model that uses K-Ep model that works?

Thank you for any help.

1 Reply Last Post 2010/04/28 15:33 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010/04/28 15:33 GMT-4
Hi, this is not a simple solution, but it is what is on my desktop at the moment.

For me the problem came down to the inlet conditions. Whatever I guessed, would turn out to be wrong and I'd get NaN's, sqrt(negative), etc, etc. Very frustrating. Does not seem sensitive to outlet conditions.

What I do in the attached is glue a short section of pipe to the bottom of the domain of interest. Use **periodic** boundary conditions on that short section. This effectively solves for u, v, k and d on the inlet and the convergence then seems relatively robust in the rest of the pipe. Effectively I have solved for the boundary conditions for an infinite amount of pipe just below the inlet.

I also apologize in advance that I haven't (yet) checked the results of this code against standard formulations for pressure drop, etc. But hey:: it converges :-)

Regards, John
Hi, this is not a simple solution, but it is what is on my desktop at the moment. For me the problem came down to the inlet conditions. Whatever I guessed, would turn out to be wrong and I'd get NaN's, sqrt(negative), etc, etc. Very frustrating. Does not seem sensitive to outlet conditions. What I do in the attached is glue a short section of pipe to the bottom of the domain of interest. Use **periodic** boundary conditions on that short section. This effectively solves for u, v, k and d on the inlet and the convergence then seems relatively robust in the rest of the pipe. Effectively I have solved for the boundary conditions for an infinite amount of pipe just below the inlet. I also apologize in advance that I haven't (yet) checked the results of this code against standard formulations for pressure drop, etc. But hey:: it converges :-) Regards, John

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.