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.

comparing solutions

Please login with a confirmed email address before reporting spam

I want to run a (ac/dc) problem twice with different boundary conditions and compare the solutions (straight difference to begin with). I am not sure exactly how to do this so am looking for some help/ideas. I think the simplest thing to do is run one solution then enable/disable the approapriate boundary conditions and run again putting the results into a different solution set - I'm not exactly certain how to do that. The simplest would way I can think of is to create a duplicate study (same geometry, materials, nesh, etc.) and somehow convince it to put the results into the second set. Is this possible? The next question is how to compare the two solution data sets. Is it possible to create a data set that is the difference between two existing data sets? IF so how is this done. Is there some other way to do this within Comsol. If not and I have to export the data, does anyone have some recommendations on software that will allow me to combine and visualize the solutions? This is a 3D time dependent problem so althought the geometry is failry simple, the solution sets are large.

4 Replies Last Post 17 apr 2011, 09:57 GMT-4
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 16 feb 2011, 17:42 GMT-5
Hi

You can plot on the same final graphs results (under the same plot group) from two different studies, for which you have changed manually, as you propose too, the BCs.
I have heard that in a future version the BC enable/disable will eventually be linked to the studies such that you will automatically switch BC by selecting another study.

You then refer the sub nodes of your plot group to each separate solution, and the main Plot node to "none".

But this does not allow (from my knowledge) to do mathematical operations on data from the different solutions: I do not know about an operator combination of the type (or is it the "with()" and "at()" that could do ?)

solution(1,the_wanted_variable) - solution(2,the_wanted_variable)

Could be nice to have though

Perhaps if you make two identical but separate models, then you have unique names for each study, but then you cannot select 2 studies, nor combine two, from my knowledge, for Plotting

Remains Matlab where you can combine things at will

--
Good luck
Ivar
Hi You can plot on the same final graphs results (under the same plot group) from two different studies, for which you have changed manually, as you propose too, the BCs. I have heard that in a future version the BC enable/disable will eventually be linked to the studies such that you will automatically switch BC by selecting another study. You then refer the sub nodes of your plot group to each separate solution, and the main Plot node to "none". But this does not allow (from my knowledge) to do mathematical operations on data from the different solutions: I do not know about an operator combination of the type (or is it the "with()" and "at()" that could do ?) solution(1,the_wanted_variable) - solution(2,the_wanted_variable) Could be nice to have though Perhaps if you make two identical but separate models, then you have unique names for each study, but then you cannot select 2 studies, nor combine two, from my knowledge, for Plotting Remains Matlab where you can combine things at will -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 apr 2011, 07:45 GMT-4

Hi

You can plot on the same final graphs results (under the same plot group) from two different studies, for which you have changed manually, as you propose too, the BCs.
I have heard that in a future version the BC enable/disable will eventually be linked to the studies such that you will automatically switch BC by selecting another study.

You then refer the sub nodes of your plot group to each separate solution, and the main Plot node to "none".

But this does not allow (from my knowledge) to do mathematical operations on data from the different solutions: I do not know about an operator combination of the type (or is it the "with()" and "at()" that could do ?)

solution(1,the_wanted_variable) - solution(2,the_wanted_variable)

Could be nice to have though

Perhaps if you make two identical but separate models, then you have unique names for each study, but then you cannot select 2 studies, nor combine two, from my knowledge, for Plotting

Remains Matlab where you can combine things at will

--
Good luck
Ivar


HI, Ivar,

I'm happy to find such a thread, because i want to combine many Separated solutions in different files generated by parametric sweeping. The whole transient simulation is about a moving Heat transfer, and each parametric solution contains a moving step. After the calculation, i have to plot a Temperature-time line at a specific point, so how to combine all the solutions together? Could you please give some suggestions or how to operate in matlab?

I have tried turn on the "store solution in model " option in parametric solver setting, but finally the solver failed as the storage consuming up RAM. (Even all solution can be stored in one model, they are stored separated in solution containers, which will cause trouble to post-process )

Thanks for your time,Dr.Ivar
Best regards
[QUOTE] Hi You can plot on the same final graphs results (under the same plot group) from two different studies, for which you have changed manually, as you propose too, the BCs. I have heard that in a future version the BC enable/disable will eventually be linked to the studies such that you will automatically switch BC by selecting another study. You then refer the sub nodes of your plot group to each separate solution, and the main Plot node to "none". But this does not allow (from my knowledge) to do mathematical operations on data from the different solutions: I do not know about an operator combination of the type (or is it the "with()" and "at()" that could do ?) solution(1,the_wanted_variable) - solution(2,the_wanted_variable) Could be nice to have though Perhaps if you make two identical but separate models, then you have unique names for each study, but then you cannot select 2 studies, nor combine two, from my knowledge, for Plotting Remains Matlab where you can combine things at will -- Good luck Ivar [/QUOTE] HI, Ivar, I'm happy to find such a thread, because i want to combine many Separated solutions in different files generated by parametric sweeping. The whole transient simulation is about a moving Heat transfer, and each parametric solution contains a moving step. After the calculation, i have to plot a Temperature-time line at a specific point, so how to combine all the solutions together? Could you please give some suggestions or how to operate in matlab? I have tried turn on the "store solution in model " option in parametric solver setting, but finally the solver failed as the storage consuming up RAM. (Even all solution can be stored in one model, they are stored separated in solution containers, which will cause trouble to post-process ) Thanks for your time,Dr.Ivar Best regards

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 17 apr 2011, 08:22 GMT-4
Hi
I must admit that I have not now had so many data sets that I couldnt store everything in one file, even if some are up in the Gb size. If you have managed to distribute the solution among several files (I know how to do that in 3.5, not sure how to in v4) then I agree you have, from my knowledge, onlya Matlab (or perhaps also java programming) to revisit all these files and postreat yourdata, by combining content from the different files.

Perhaps new possibilities will come in V4.2, that is supposed to be "just around the corner" ;)

--
Good luck
Ivar
Hi I must admit that I have not now had so many data sets that I couldnt store everything in one file, even if some are up in the Gb size. If you have managed to distribute the solution among several files (I know how to do that in 3.5, not sure how to in v4) then I agree you have, from my knowledge, onlya Matlab (or perhaps also java programming) to revisit all these files and postreat yourdata, by combining content from the different files. Perhaps new possibilities will come in V4.2, that is supposed to be "just around the corner" ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 apr 2011, 09:57 GMT-4
Hi,Dr.Ivar

Thanks for your prompt reply.
Could you please insight me how you make it in comsol 3.5 using matlab? Should I make a loop to visit every file (about 60 solutions) and then get the data with comsol script?

Because every step the mesh changes, I think it will be a tough job for me.
Till now, i don't know whether ALE can make it.

Best regards
Hi,Dr.Ivar Thanks for your prompt reply. Could you please insight me how you make it in comsol 3.5 using matlab? Should I make a loop to visit every file (about 60 solutions) and then get the data with comsol script? Because every step the mesh changes, I think it will be a tough job for me. Till now, i don't know whether ALE can make it. Best regards

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.