Recent content by msanx2

  1. M

    MATLAB Solving Chromatography PDE with MOL and ode15s

    I think now I kind of solved it. However when the wave reaches the right boundary there is some noise in the wave. Do you know what could be the reason? function [sol, t, x, C] = LDF_mol(isoType, feedProf, parameter, L, Di, epsb, Q, Cfeed, KLDF, Dax, tpulse, tfinal, opt) % Transport-Dispersive...
  2. M

    MATLAB Solving Chromatography PDE with MOL and ode15s

    FUNCTION 2 %% Isotherm Library function q=isotherm1(isoType, C, Cs, nc, parameter) % Defines the isotherm parameter = transpose(parameter); N = length(Cs); q = zeros(N,nc); Cmat = zeros(N,nc); for i = 1:nc idx1 = 1+(i-1)*N; idx2 = i*N; Cmat(:,i) = C(idx1:idx2); end if...
  3. M

    MATLAB Solving Chromatography PDE with MOL and ode15s

    My code: FUNCTION 1: function [sol, t, x, C] = LDF_mol(isoType, feedProf, parameter, L, Di, epsb, Q, Cfeed, KLDF, Dax, tpulse, tfinal, opt) % Transport-Dispersive Model (TDM) considering mass transfer resistence in the solid to be dominant and % using the Linear Driving Force Model (LDF)...
  4. M

    MATLAB Solving Chromatography PDE with MOL and ode15s

    Hello all I am using the method of lines to solve the following PDE: ## \frac {\partial C} {\partial t} + F\frac {\partial q} {\partial t} + u \frac {dC} {dz} = D_{ax} \frac{\partial^2 C} {\partial z^2} ## ## \frac {\partial q} {\partial t} = k (q^{*}-q) ## With these initial conditions: ##...
  5. M

    Unnecessary Pump in a Frictionless Pipe: Impact on Pressure and Work

    Suppose I would use Bernoulli equation to compare point 1 before the pump and point 2 after the pump: $$ \frac{P_{1}}{\rho g} + \frac{v_{1}^2}{2g} + z_{1} + \Delta h_{p}= \frac{P_{2}}{\rho g} + \frac{v_{2}^2}{2g} + z_{2} + \Delta h_{f} $$ By the continuity equation, $$ v_{1} = v_{2} $$...
  6. M

    Unnecessary Pump in a Frictionless Pipe: Impact on Pressure and Work

    Imagine a pump is installed in a pipe where there would be no need for it (no friction, no height difference, etc.). In order for the energy balance to be correct, does this imply that the fluid would experience friction inside the pump the same as the head provided by the pump?
  7. M

    A Obtain parameter derivatives solving PDE

    Yes, you're right I forgot it. Both B(p) and G(p) should be B(p,t) and G(p,t). I changed it already on the previous post. I already solved the first PDE I showed using finite differences. However, I was interested in obtaining the derivatives of n(t,L,p) with respect to the parameter vector p...
  8. M

    A Obtain parameter derivatives solving PDE

    Sorry if the formulation was not the most correct one. So, just to be clear: $$\frac {\partial n(t,L,p)}{\partial t} = -G(t,p)\cdot\frac {\partial n(t,L,p)}{\partial L}$$ where $$p = \{k1,k2,a,b\}$$ One can assume that: $$G(t,p) = k1\cdot a \cdot t$$ Boundary condition is: $$n(t,0,p) =...
  9. M

    A Obtain parameter derivatives solving PDE

    I have a PDE which is the following: $$\frac {\partial n}{\partial t} = -G\cdot\frac {\partial n}{\partial L}$$ with boundary condition: $$n(t,0,p) = \frac {B}{G}$$ , where G is a constant, L is length and t is time. G and B depend on a set of parameters, something like $$B = k_1\cdot C^a$$...
  10. M

    Question about pressure inside closed flask

    Yes you're right.
  11. M

    Question about pressure inside closed flask

    Just as another point. Imagine that I have an open tank, at 20ºC, in contact with the atmosphere. I fill it with water until half-volume an then I seal the tank. I am guessing that, at that moment, P = Pair + Pvap (water) = 101.325 kPa (because it was in mechanical equilibrium with the...
  12. M

    Question about pressure inside closed flask

    Thank you both. I think I got it. It's the fact that some small amount of liquid is lost that makes the pressure decrease. Like for example when a container is filled with water and has an outlet valve. If the lid is closed, liquid will flow out due to Patm, but at some point vacuum is created...
  13. M

    Question about pressure inside closed flask

    Let's imagine that a flask is initially opened and in contact with the atmosphere. I am thinking that when the flask is closed with a lid, the air density inside will be kept the same as outside. As so, the pressure inside should remain Patm: P = (n/V).RT (n/V constant) However, shouldn't...
Back
Top