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.
Initial Values setting during parametric sweep calculation
Posted 09.09.2015, 04:59 GMT-4 Studies & Solvers Version 5.1, Version 5.3 5 Replies
Please login with a confirmed email address before reporting spam
When I was doing parametric sweep in a stationary solver, I found that once the "stationary solver" is started, the initial value for every parametric step is defined by solution of the last parametric step. But in my case, I want to custom the initial values during the parametric calculation steps using solutions i get from other solvers so that the convergence can be faster.
Is that possible in comsol ?
Thank you guys in advance!
Chen Bin
Please login with a confirmed email address before reporting spam
You have two types of parametric sweep: the "continuous" one using last solution values as initial values for the next step, defined as a "solver continuation" (defined in the bottom of the Solver tab) and the true Parametric Sweep Solver node you add.
The latter starts again, by default, from the initial conditions, mostly all "0" by default, so for you add the Parametric Sweep if this is wanted.
By the way the behaviour of the Paramereic sweep and the "automat Continuation" detection has change in V5, and I'm still quite confused, as the doc and help, for me, has not yet fully followed.
So do your "toy-models" to check the correct behaviour
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I have check the parametric node only finding the following 4 related taps and options:
Run continuation for (manual/no para/last para)
continuation parameter (paras I defined to choose)
Reuse solution for previous step (yes/no)
on error (stop/store)
From the reference manual, it seems all this four taps only help the solver jump from the solution for
the last user defined parametric step to the next user defined parametric step by adding more steps between them. this adaptive algorithm can not make the solver load a totally new solution dataset from other Study node as current values for variables before the start of any arbitrary step in the parametric value list when the sweep is already in progress.
I tried a for-loop calculation of normal stationary solver to do this sweep manually in Matlab, with the help of Store Solution node. And It works this time.
Bin
Please login with a confirmed email address before reporting spam
I'm sure this was discusseed perhaps 6-12 months ago on the Forum, try a (several) search(es)
I know I run sometimes a first series of solver steps (i.e. stationary with continuation) and then I have a separate parametric study with some add-on physics and i.e. time series, and that allows me to extract initial conditions from the first study, it works.
a) you need to define the source of the initial conditions from the Dependent variable Solver sub node.
b) you might need an at() or with() or withsol() operator to interpolate into the first series, all depending on your parameter and the settings of both sovler sequences.
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
a) you need to define the source of the initial conditions from the Dependent variable Solver sub node.
This is the correct way to proceed. We distinguish two groups of variables, those solved for in the current step, and those not solved for in the current step, For both you can set individual sources for initial values.
b) you might need an at() or with() or withsol() operator to interpolate into the first series, all depending on your parameter and the settings of both sovler sequences.
at() and with() will not work, as they are mere postprocessing opeartors and cannot be called within solutions or to inherit solutions. withsol() is a new oparator that can be used to refer to solutions of other study steps within a calculation. However, if only initial values are concerned, the startegy a) is the better approach.
Best regards,
Sven
Please login with a confirmed email address before reporting spam
In older version 5.0 this was working as expected.
What is the issue (Using Comsol 5.3)?
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.
Suggested Content
- BLOG Mode Analysis for Electromagnetic Waveguides in COMSOL®
- BLOG Solution Joining for Parametric, Eigenfrequency, and Time-Dependent Problems
- FORUM Passing Multi-Parameter Parametric Sweep Solutions as Initial Values
- FORUM Parametric Sweep Results as Initial Values
- KNOWLEDGE BASE Running parametric sweeps, batch sweeps, and cluster sweeps from the command line
