Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
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.
1 function, 2 solving methods, 2 different answers, Math problem or comsol problem?
Posted 18 mar 2012, 15:24 GMT-4 Materials Version 4.2a 4 Replies
Please login with a confirmed email address before reporting spam
Good day dear colleagues!
I have a problem with solving a function that describes a chemical reaction and I would gladly hear your opinions about this issue.
I model a certain process as a batch type reaction (constant volume):
dCa/dt = -k * Ca. If this is integrated analytically I get: Ca = Ca0 * exp(-k*t) and the flux of matter is then just the change: dCa/dt.
k Is defined as: k0 * exp( -E_A / R * T)
If I model this (as mass, using constant volume and constant molar mass), I get two different equations:
1] expression for mass left and mass flux, modeled as variables:
m_H2O_l_kg = Moisture_init_wtkg_zone*exp(-k_H2O*t)
m_H2O_fluxie_kgs = -d(m_H2O_l_kg,t)
2] function directly modeled using a PDE (general form)
dm_H2O/dt = -k_H2O*m_H2O,
initial mass = Moisture_init_wtkg_zone, initial flux = -k_H2O * Moisture_init_wtkg_zone
The problem is that I expect the results to be exactly the same, but they are quite different!
I included the plots and a very simple model using these functions.
Could anyone explain the difference? What am I missing here? (And which method is actually right?)
Many thanks for any input in advance. :)
Kind regards,
Ray
I have a problem with solving a function that describes a chemical reaction and I would gladly hear your opinions about this issue.
I model a certain process as a batch type reaction (constant volume):
dCa/dt = -k * Ca. If this is integrated analytically I get: Ca = Ca0 * exp(-k*t) and the flux of matter is then just the change: dCa/dt.
k Is defined as: k0 * exp( -E_A / R * T)
If I model this (as mass, using constant volume and constant molar mass), I get two different equations:
1] expression for mass left and mass flux, modeled as variables:
m_H2O_l_kg = Moisture_init_wtkg_zone*exp(-k_H2O*t)
m_H2O_fluxie_kgs = -d(m_H2O_l_kg,t)
2] function directly modeled using a PDE (general form)
dm_H2O/dt = -k_H2O*m_H2O,
initial mass = Moisture_init_wtkg_zone, initial flux = -k_H2O * Moisture_init_wtkg_zone
The problem is that I expect the results to be exactly the same, but they are quite different!
I included the plots and a very simple model using these functions.
Could anyone explain the difference? What am I missing here? (And which method is actually right?)
Many thanks for any input in advance. :)
Kind regards,
Ray
Attachments:
4 Replies Last Post 19 mar 2012, 11:50 GMT-4