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.

Combine two solutions

Please login with a confirmed email address before reporting spam

Hey all,

I have two consecutive time dependent studies and two solutions sol1 and sol2. In postprocessing I would now like to "stitch" these two solutions together, so that instead of having to deal with two data sets sol1 and sol2 I just have one data set solComb that contains the combination of these consecutive two solutions.

I want to be able to access the time(1) which lies in sol1 and time(6) which lies in sol2 with just one data set.

Thanks in advance for your help

best

Paul-Remo Wagner

7 Replies Last Post Mar 31, 2017, 2:16 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Feb 5, 2016, 8:16 a.m. EST
Hi all,

I have the same problem!

Plus I have another issue about "study section". In my defined project I have two studies (first study divided by two section which are time dependent and consecutive to each other). Second study was linked to the first study.
How is it possible to link the second study to the first study with applying "a solution which combined of sol1 and sol2"?
Is it possible to do it in comsol?

Thanks in advance for sharing your information.
Sepideh
Hi all, I have the same problem! Plus I have another issue about "study section". In my defined project I have two studies (first study divided by two section which are time dependent and consecutive to each other). Second study was linked to the first study. How is it possible to link the second study to the first study with applying "a solution which combined of sol1 and sol2"? Is it possible to do it in comsol? Thanks in advance for sharing your information. Sepideh

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Apr 28, 2016, 9:42 a.m. EDT
Hi,

I am also interested to know how to do the exact same thing !
It would be to do an animation for time intervals split in two studies (but continuous : one transient study followed the other by taking the last solution as initial solution).

Best regards,
Julien
Hi, I am also interested to know how to do the exact same thing ! It would be to do an animation for time intervals split in two studies (but continuous : one transient study followed the other by taking the last solution as initial solution). Best regards, Julien

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Apr 29, 2016, 12:45 p.m. EDT
You can create new dataset using join function. Right click on dataset and select 'join'. The operation can be explicit.
You can create new dataset using join function. Right click on dataset and select 'join'. The operation can be explicit.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago May 3, 2016, 9:29 a.m. EDT
Hi Sohan,

thank you for your answer! I looked at the join feature before, but I was lost in the list of operations.

Now I tried with "explicit", but it still doesn't work...I think.

let's say I have Study1/Solution1 that goes from time 0 to 10 s, and Study2/Solution2 from 10 to 20 s.
I created a "Join 1" Data set, with "Explicit" combination.

In a surface plot, I select the Data Set "Join 1", but the Time drop-down list only goes from 0 to 10 s...

What did I do wrong ?
Hi Sohan, thank you for your answer! I looked at the join feature before, but I was lost in the list of operations. Now I tried with "explicit", but it still doesn't work...I think. let's say I have Study1/Solution1 that goes from time 0 to 10 s, and Study2/Solution2 from 10 to 20 s. I created a "Join 1" Data set, with "Explicit" combination. In a surface plot, I select the Data Set "Join 1", but the Time drop-down list only goes from 0 to 10 s... What did I do wrong ?

Please login with a confirmed email address before reporting spam

Posted: 8 years ago May 4, 2016, 5:20 p.m. EDT
For the usage of join function, please follow the procedure below. See also the example.
1. Please create a Join node in Results -> Data Sets, and point the data
settings to the two existing data sets. Set the method of combination to
Explicit.

2. Create a Cut Point 2D node that points to Join 1.

3. Create a dummy time parameter t1 in Global Definitions -> Parameters.

4. Create a 1D Plot Group in Results and select Cut Point 2D 1 as the Data
set. Time selection should be set to Interpolated.

5. Create a Point Graph sub-node, whose Data set option is From parent. The
expression to plot is if(t>100,data2(T),data1(T)). This expression would
plot temperature from Study 1/Store Solution 1 for t = 0 to t = 100 and
using Study 1/Solution 1 for values of time > 100.

6. Use the same expression for a second Point Graph sub-node. This graph
uses interpolated time which points to the dummy time parameter t1. We will
use t1 to animate the plot. The Coloring and Style setting is set to show
only data points but no curves.

7. In Results -> Export, please create an animation whose subject is the 1D
Plot Group. In Animation Editing settings please set the sequence type to
Result parameter and set the parameter to t1. If you make t1 start from 0
and ends at 200, you will be able to plot data from both data sets.
For the usage of join function, please follow the procedure below. See also the example. 1. Please create a Join node in Results -> Data Sets, and point the data settings to the two existing data sets. Set the method of combination to Explicit. 2. Create a Cut Point 2D node that points to Join 1. 3. Create a dummy time parameter t1 in Global Definitions -> Parameters. 4. Create a 1D Plot Group in Results and select Cut Point 2D 1 as the Data set. Time selection should be set to Interpolated. 5. Create a Point Graph sub-node, whose Data set option is From parent. The expression to plot is if(t>100,data2(T),data1(T)). This expression would plot temperature from Study 1/Store Solution 1 for t = 0 to t = 100 and using Study 1/Solution 1 for values of time > 100. 6. Use the same expression for a second Point Graph sub-node. This graph uses interpolated time which points to the dummy time parameter t1. We will use t1 to animate the plot. The Coloring and Style setting is set to show only data points but no curves. 7. In Results -> Export, please create an animation whose subject is the 1D Plot Group. In Animation Editing settings please set the sequence type to Result parameter and set the parameter to t1. If you make t1 start from 0 and ends at 200, you will be able to plot data from both data sets.


Please login with a confirmed email address before reporting spam

Posted: 8 years ago May 9, 2016, 4:23 a.m. EDT
Dear Sohan,

Thank you for your detailed answer and your example, but i think it does not apply to what I want to do.
I just want to animate a 2D surface plot of a certain variable (space charge density, in fact), with time-dependent results from two different studies, as explained before.

For now, I just avoid splitting the time interval and try to simulate everything in one go.
Dear Sohan, Thank you for your detailed answer and your example, but i think it does not apply to what I want to do. I just want to animate a 2D surface plot of a certain variable (space charge density, in fact), with time-dependent results from two different studies, as explained before. For now, I just avoid splitting the time interval and try to simulate everything in one go.

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Mar 31, 2017, 2:16 p.m. EDT
Combining the results of two time-dependent analyses into one ("Stitching" them together) is a capability that is being added in the soon-to-be-released version 5.3.
Watch the Release Highlight webinar:
www.comsol.com/community/forums/general/thread/140362/
Best,
Jeff
Combining the results of two time-dependent analyses into one ("Stitching" them together) is a capability that is being added in the soon-to-be-released version 5.3. Watch the Release Highlight webinar: https://www.comsol.com/community/forums/general/thread/140362/ Best, Jeff

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.