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.
Updating COMSOL variables at each time step
Posted Aug 4, 2014, 8:44 p.m. EDT Interfacing Version 4.4 3 Replies
Please login with a confirmed email address before reporting spam
I am trying to solve a model which requires updating a variable (something like a boundary condition) based on the solution at each TIME STEP. I am planning to use MATLAB LiveLink on order to have a control over COMSOL model solution as it progresses in time. I know there is a function to run the study node (something like Model.sol('xxx').run('xxx')); but it does not work for me, as it starts to solve the whole study. I want to have control over time stepping.
A brief description of what is going to happen in my model is as follows:
1. set initial/boundary conditions and start to solve the model
2. advance one time step
3. evaluate some predefined expression (specifically, a line integral of a solution variable)
4. check if this line integral has the value that you expect (e.g. we want it to be equal to 2)
5. if yes, then advance one time step. If not, do this time step again with updated boundary condition (until criteria are satisfied) and then advance in time.
Thanks!
Ali
Hello Ali Hemmatifar
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.