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.

Using step function in kinetic reaction simulation

Please login with a confirmed email address before reporting spam

Hi

I am trying to simulate the kinetic reaction of biomolecule interaction in fludic channel expecting to have association and dissociation phase (concentration of complex versus time) in the same curve. I knew that it is possible to use step function or smoothed Heaviside step function from COMSOL in order to change the concentration of analyte species at the inlet from C=x mol/m3 to C=0 mol/m3 at a certain time. I have no idea how to find this function and what kind of variables I need to defind. Anyone has any experience on this?

Regards,

Pattamon

5 Replies Last Post 2013年1月29日 GMT-5 04:01
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月25日 GMT-5 19:38
Hi

in v4 you find these under root-Globa-Definitions, or better: Model-Definitions-Functions, use the dynamic doc and search the HTML or PDF doc

--
Good luck
Ivar
Hi in v4 you find these under root-Globa-Definitions, or better: Model-Definitions-Functions, use the dynamic doc and search the HTML or PDF doc -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月28日 GMT-5 09:21
Hi,

I have tried to put the step function where I want to change the inlet concentration from c0 to 0 at time = 400s.
I defined the step function for concentration in the variables. It didn't not work for now. I guess my function is not correct or I need to add something more. I also attached my short simulation model here.

Thank you for your advice.

Pattamon
Hi, I have tried to put the step function where I want to change the inlet concentration from c0 to 0 at time = 400s. I defined the step function for concentration in the variables. It didn't not work for now. I guess my function is not correct or I need to add something more. I also attached my short simulation model here. Thank you for your advice. Pattamon


Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月28日 GMT-5 15:12
Hi

first of all your shape is very thin, with only 1 element across you do not resolve a lot, try to scale the vertical axis by i.e 100 in the mesh advanced tab.

Then your process is over in 4 seconds, your solver steps seem to be far too long, what about cutting your rectangle with a layer (geometry tab) at te half height of 0.3 um, then solve and look at the concentration along this central line in a line plot

--
Good luck
Ivar
Hi first of all your shape is very thin, with only 1 element across you do not resolve a lot, try to scale the vertical axis by i.e 100 in the mesh advanced tab. Then your process is over in 4 seconds, your solver steps seem to be far too long, what about cutting your rectangle with a layer (geometry tab) at te half height of 0.3 um, then solve and look at the concentration along this central line in a line plot -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月29日 GMT-5 02:57
Hi,

The step function uses the concentration as the input argument (the switch), but that should be the time t. Also the step amplitude is the concentration c0, so I don't see why that value is multiplied with the step output in the variable intl: c0*step1((c0-0)[m^3/mol])

I think that you should use:

step1(t[1/s])[mol/m^3]

where "[1/s]" is used to make the argument unitless and the unit of the output is mol/m^3 for a concentration.

Also, perhaps the initial value should be c0 rather than 0? Now the initial value and the boundary condition for the concentration don't match at the start of the simulation.

Best regards,
Magnus Ringh, COMSOL
Hi, The step function uses the concentration as the input argument (the switch), but that should be the time t. Also the step amplitude is the concentration c0, so I don't see why that value is multiplied with the step output in the variable intl: c0*step1((c0-0)[m^3/mol]) I think that you should use: step1(t[1/s])[mol/m^3] where "[1/s]" is used to make the argument unitless and the unit of the output is mol/m^3 for a concentration. Also, perhaps the initial value should be c0 rather than 0? Now the initial value and the boundary condition for the concentration don't match at the start of the simulation. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月29日 GMT-5 04:01
Hi

Thank you so much for all advices. It works now :)

Best Regards,

Pattamon
Hi Thank you so much for all advices. It works now :) Best Regards, Pattamon

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.