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.
Store solution and use as a boundary condition for the next run
Posted 2010年7月28日 GMT-4 08:20 Interfacing, Parameters, Variables, & Functions, Studies & Solvers Version 4.1 11 Replies
Please login with a confirmed email address before reporting spam
Does anybody knows how to apply the results obtained at the outlet of first run back to the inlet as an inlet bounrady condition? Actually the objective is to study a flow in a long clyinder by making it in small cylinders and repeating the BCs from solution back to the inlet. This will save the memory and help in reducing the size of geometry while getting the same results which would actually be obtained in a long clyinder simulation.
Any ideas will be highly appreciated.
regards
Naveed
Please login with a confirmed email address before reporting spam
How I learnt to set this up was to type in an extra "Stationary" study step, then type "Generate Sequences". Somewhat to my surprise, COMSOL created the sequence fo run the first study step, save it, then run the second study step. You can have one study step for one model and a different model for the second study step.
You can then click on the list of variables in the first step to not calculate the ones for the second step. You can also use linext to "copy" data from one model to the next so you've got the data you need for the second run.
Kind of a hack, but it works.
Regards, John
Please login with a confirmed email address before reporting spam
in V3.5 you have the solver manager sequening tab,
in V4 you can build your sequences and use (right click down in the model solver tree) "store solution" after a first run and continue to build the sequences there after, just correct how the initial conditions are used for the second run.
You can learn from a COMSOL default " structural bukling analysis" it sets up a stationary solver + store solution + eigenfrequency analysis from a linearised point of the first stationary analysis
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thanks for the hints. Now, the question comes how to apply the results obtained at the outlet x-section of the first run as an initial conditions for the second and subsequent runs?
I am using 3.5a.
Thanks
Naveed
Please login with a confirmed email address before reporting spam
Thanks for the reply. I am using 3.5a and it seems hard to follow what you have written specifically for 4.0. Now, my main concern is how to apply the results obtained in the first run (at the outlet boundary) as an initial condition for the subsequent runs (at the inlet boundary) and so on to create an automatic loop.
Thanks
Naveed
Please login with a confirmed email address before reporting spam
I would do that in a loop with matlab that calls out the model, and copies the result over to the inlet and runs the hole system again. Probaby by using the same mesh on input/output surfaces you get the best results.
One could ask the question, how mush different is this from a "one way" boundary periodic condition: "out" to "in" with a stationary or time dependet analysis ? I'm not sure what to say to that, perhaps worth a try if it works the same way, pls report back it could be interesting to know ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
How do I store a solution of one run and then make some changes in the geometry and sub-domain for the 2nd run and assume initial conditions for the same as the results of the 1st run ?
I am trying to add material to the geometry in heat transfer after my 1st run and then using the results for the 2nd appended geometry run.
-Raghav
Please login with a confirmed email address before reporting spam
It no easy task if you change the geometry because that mostly implies change of topology and of domain and boundary ID's whcih makes the mapping from one model to the next hardly possible. I believe that in 3.5 you have only matlab to help you out, in V4 you can "store the solution" and use it as" initial conditions" for another solver sequence provided he topology has not changed)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Thank you for your advice.
Actually I was working on a heat transfer problem based on Rotational Molding wherein I have a particular geometry for the 1st run, but then there is supposed to be introduction of new material in the 2nd run (actually its new polymer introduced after the 1st set has melted). So introducing new material basically means removing some geometry and subdomain space alloted to "air" in the 1st run and adding the new polymer material as a 3rd domain in addition to the existing "air" and "1st polymer" domains.
I wish to retain the values of temp. and physical state for the two domains and set the new polymer material to room temp as its being added to the mold. However I since the new material occupies some of the space earlier occupied by "air", i guess COMSOL assumes the values of temp. for that space as the solution from the 1st run and overrides the initial value am setting for the new domain. I have set the solver settings as "Initial value from stored solution".
Thanks
-Raghav
PS : Also I am having some problem attaching a file to this forum. I wish i could give you a better picture of my problem. If you could let me know your personal mail-id i could probably send you my model and perhaps you would help me out in a better way.
Please login with a confirmed email address before reporting spam
if the file is too big, clear the solutions and the mesh, then normally its uploadable, else take a few screen shots with snipit or another tool.
Now 3.5 is so "old" for me that I have forgotten most of the tricks, not sure I can do that much, unfortunately
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
i think i have exactly the same question naveed had before. i want to get the boundary values of my static solution and give them as part of the boundary condition for the time-dependent problem. ivar, you wrote "I would do that in a loop with matlab that calls out the model, and copies the result over to the inlet and runs the hole system again." - but i dont know HOW you do that!! :(
since i use two different pde systems anyway, i tried first to name the variable in the static problem 'cp0' and in the time-dep. 'cp1', but if i use just 'cp0' in the second pde system after having solved the first one, comsol has different values stored for 'cp0' in the first solution and 'cp0' in the second solution - how can that be? or can i use mpheval after solving the first pde system (i.e. "sol1cp0b3=mpheval(model,'cp0','edim',1,'selection',3)"), but then i get an error message when i try to use this in my b.c..
naveed, did you find a way to do it? or anyone else? or is there now an example for it somewhere availabe? please, help!!! :)
all best
sabine
Please login with a confirmed email address before reporting spam
if your variables have different names they will not match I believe, I'm not sure how the initial conditions of a study2 will link into a study 1 if you state in the initial values of study 2 the variable names of a study 1, ths needs some testing, anyhow it might well have changed from 4.1 to my newer 4,3a too
--
Good luck
Ivar
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.