How to simulate a counter-current gas absorption?

5 次查看(过去 30 天)
I'm trying to simulate a counter current gas absorption, with a general equation in the form:
dy_liq=transfer*holdup*Ar/(Vl);
dy_gas=transfer*holdup*Ar;
where the transfer vector has the correct signal to be applied in the equation. I'm solving the system with ode15s. I get a reasonable solution when simulating it in co-current (volume flow Vl>0), but when trying in counter-current (Vl<0 and adjusting initial values) the following errors always occurs:
Warning: Matrix is singular, close to singular or badly scaled. Results may be inaccurate. RCOND =
NaN.
Warning: Failure at t=8.888951e-01. Unable to meet integration tolerances without reducing the step
size below the smallest value allowed (1.776357e-15) at time t.
Does anyone know what the problem is? Is the Vl<0 wrong for counter current or should I adjust something in my program, even though it works for cocurrent?
Thanks for the help!

回答(1 个)

Jyotish Robin
Jyotish Robin 2018-2-26
Hi Luis!
With regards to the first warning:
A matrix used in a computation is singular or is very close to being singular (ill conditioned). Trying to solve a system of linear equations whose coefficient matrix is singular can lead to incorrect answers.
In your code, you are possibly using a matrix that is badly conditioned as one of the arguments to the forward slash (/) operator.
Solution: Determine the condition number of the coefficient matrix (the matrix on the right side of the forward slash (/) using the COND function. Large results for the condition number indicate the matrix is extremely ill-conditioned. You should verify (using the matrix multiplication operator (*)) that the result of solving the system is numerically reliable.
For more information about condition numbers of matrices, see Chapter 2: Linear Equations of the Cleve Moler's Numerical Computing with MATLAB book, which discusses solving systems of linear equations.
Cleve's Book:
With regards to the second warning:
When there is a sharp change in the derivative of an ODE function, variable step integrators such as ODE15s reduce the step size in an attempt to satisfy the integration tolerances. Sometimes when the change is very sharp, the integrator attempts to reduce the step size below the smallest value allowed, and the following warning is generated:
Warning: Failure at t= XXXXX. Unable to meet integration tolerances without reducing the step size below the smallest value allowed at time t
To work around this, relax the integration tolerances and run the simulation again.
Hope this helps!
Thanks,
Jyotish

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by