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.

read initial conditions for laminar flow problem from external file.

Please login with a confirmed email address before reporting spam


Hello,

First of all, I like to apologize if this is a fundamental question but I cannot find an answer to it and I am new to Comsol.

I am running a 2D laminar flow problem and have to integrate over very long times.
I know that I can add solvers to use the solution of another solver as initial condition to continue the simulation.
My problem is that the data files are getting insanely huge and the processing time is over all measures (50GB!)

With my old FEM program, I just saved the last time step of an simulation in an external file (=100kB or so) and started the new simulation with this file as initial condition. So I had multiple files of acceptable size with reasonable processing time.
My question: How can I save the last time step in an external data file and use it as initial condition for another simulation with the same physics and same mesh.
Thanks for the help,

Dominik

4 Replies Last Post 17.06.2016, 09:19 GMT-4
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 16.06.2016, 17:19 GMT-4
A 50GB file strongly suggests you are asking the software to store data at intermediary time steps that you will never need. Time steps have been discussed in the Discussion Forum before; you may also want to review the section of the Reference Manual for COMSOL Multiphysics version 5.2 dealing with the time-dependent solver, page 990 and following.
You do not need to save your results in one file only to re-import them into another file. Setting the results of one study as the start condition for another is another topic that has been discussed before in the Discussion Forum; or you can read up on "Initial Values of Variables Solved For" in the documentation.
Best,
Jeff
A 50GB file strongly suggests you are asking the software to store data at intermediary time steps that you will never need. Time steps have been discussed in the Discussion Forum before; you may also want to review the section of the Reference Manual for COMSOL Multiphysics version 5.2 dealing with the time-dependent solver, page 990 and following. You do not need to save your results in one file only to re-import them into another file. Setting the results of one study as the start condition for another is another topic that has been discussed before in the Discussion Forum; or you can read up on "Initial Values of Variables Solved For" in the documentation. Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 16.06.2016, 20:38 GMT-4
Thanks for the reply.
Actually I need all these time steps since it is an oscillating phenomena which amplifies over time. If I don't store the intermediate solutions my FFT gives me wrong values.
I just want to save one time step in a file and use this as initial condition.
It would be nice if you can answer a little bit more specific to my question. I searched the forum and could not find an answer to my question

Or if you happen to know another possibility to run long time-dependent studies with less single file data storage that would be appreciated.

Dominik

Thanks for the reply. Actually I need all these time steps since it is an oscillating phenomena which amplifies over time. If I don't store the intermediate solutions my FFT gives me wrong values. I just want to save one time step in a file and use this as initial condition. It would be nice if you can answer a little bit more specific to my question. I searched the forum and could not find an answer to my question Or if you happen to know another possibility to run long time-dependent studies with less single file data storage that would be appreciated. Dominik

Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 17.06.2016, 08:45 GMT-4
Hi Dominik,
OK, I think I understand what you want to do better now. If I follow you, you need two files: one with many time steps so you can perform an FFT as a post processing step on these, and one with just the last time step to use as the starting values for another time-dependent analysis.
In that case, you could, after solving the first time-dependent problem and saving under a new file name, add a "straw" physics and use it to store a copy of the values at the final time-step in a new and much smaller data set. Once that's done, you delete the original solution data set, reducing the file size greatly.
If I misunderstood or you need further help, please contact COMSOL support: support@comsol.com .
Best regards,
Jeff

PS: For completeness sake, and in case someone some day lands on this thread: it is quite possible to export data into a file and to read data from a file into a model (If you are interested in that, look up "Interpolation Function" in the Discussion Forum or the documentation), it's just that it's not the best approach in Dominik's case.
Hi Dominik, OK, I think I understand what you want to do better now. If I follow you, you need two files: one with many time steps so you can perform an FFT as a post processing step on these, and one with just the last time step to use as the starting values for another time-dependent analysis. In that case, you could, after solving the first time-dependent problem and saving under a new file name, add a "straw" physics and use it to store a copy of the values at the final time-step in a new and much smaller data set. Once that's done, you delete the original solution data set, reducing the file size greatly. If I misunderstood or you need further help, please contact COMSOL support: support@comsol.com . Best regards, Jeff PS: For completeness sake, and in case someone some day lands on this thread: it is quite possible to export data into a file and to read data from a file into a model (If you are interested in that, look up "Interpolation Function" in the Discussion Forum or the documentation), it's just that it's not the best approach in Dominik's case.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 17.06.2016, 09:19 GMT-4
Yes,

this seems like a possibility.

Thanks

Dominik
Yes, this seems like a possibility. Thanks Dominik

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.