- #1
TWNien
- 3
- 0
Hello,
Now I am working on the convection and diffusion problem with chemical reactions. The question is simple (but the answer is hard to me...) : I want to put a MATLAB function in the generation term, ex: the original one is " -k*c" , and I write a function r_c(x) which returns -k*x. In this case c is the dependent variable, and k is the reaction constant.
It seems to me that COMSOL can't do the Jacobian assembly for m-function with dependent variable (don't know how to compute the derivatives of m-function).
Does anyone have the same experience with the idea? Thanks for sharing.
Daniel
Now I am working on the convection and diffusion problem with chemical reactions. The question is simple (but the answer is hard to me...) : I want to put a MATLAB function in the generation term, ex: the original one is " -k*c" , and I write a function r_c(x) which returns -k*x. In this case c is the dependent variable, and k is the reaction constant.
It seems to me that COMSOL can't do the Jacobian assembly for m-function with dependent variable (don't know how to compute the derivatives of m-function).
Does anyone have the same experience with the idea? Thanks for sharing.
Daniel