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.

component coupling

Please login with a confirmed email address before reporting spam

I need to couple two components comp1 and comp2. The purpose is to use the final time-step concentration c of comp1 as the initial value c0 of comp2. What I did, I assigned c0 = comp1.genext1(comp1.c) for the target domain. However, the running result of concentration was 0 for comp2. I guess the variable time t needs to be specified in comp1.genext1(comp1.c). So I wrote comp1.genext1(comp1.c(t==170[h])). But it doesn't work. Is there anyone encountered the similar problem. I found some cases in the model library. However, they all solve stationary issues. How to deal with the time-dependent coupling?

2 Replies Last Post Dec 30, 2014, 3:06 a.m. EST
Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 20, 2014, 7:03 a.m. EST
Hi Yuexia,

if you need to refer to a tiome step only in postprocessing then you can use the at(time_i,variable) operator.
If your variable at some time_i enters an equation then you control that in the study step via "variables not solved for". There you can specify where the initial value shall be taken from, e.g. from a previous study specifically referring to time_i.

Best regards,
Sven
Hi Yuexia, if you need to refer to a tiome step only in postprocessing then you can use the at(time_i,variable) operator. If your variable at some time_i enters an equation then you control that in the study step via "variables not solved for". There you can specify where the initial value shall be taken from, e.g. from a previous study specifically referring to time_i. Best regards, Sven

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Dec 30, 2014, 3:06 a.m. EST
Dear Sven Friedel,

I also have a problem that relates to this one. Instead of using at() operator to know the value of a variable, I would like to get information of the last time step which stop by the stop condition.

Could you show me how can I get the time of the last step when the stop condition is triggered.

Best wishes,
Dear Sven Friedel, I also have a problem that relates to this one. Instead of using at() operator to know the value of a variable, I would like to get information of the last time step which stop by the stop condition. Could you show me how can I get the time of the last step when the stop condition is triggered. Best wishes,

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.