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.
v4.1 RF How to use two or more variables in parametric sweep
Posted 2011年2月19日 GMT-5 18:06 Results & Visualization, Studies & Solvers Version 4.3b 12 Replies
Please login with a confirmed email address before reporting spam
I want to do parametric sweep that effects the geometry too.
The first variable is the incident field wave length and second is angle of incidence.
How to run these parametrics or how to run nested parametric
Thanks
Irfan
Please login with a confirmed email address before reporting spam
in COMSOL v4 you have two types of parametric sweep, the "inner" one is the solver continuation sweep, this does NOT pass via the geometry, hence no geometrical nor mesh updates. And then the true "parametric sweep" (right click on the solver node add a parametric sweep) that loop around the full model, including geoemtry update and mesh update if requires
Nesting comes by itself, depending on the order of call/defiunition (use up/down as appropriate)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
In one parametric node I can add multiple variables ,scroll up down but... cannot provide ranges for each variable separately. I mean for each variable, I cannot assign different values, it takes only one range for all variables
Thanks
Irfan
Please login with a confirmed email address before reporting spam
Well I have a similar problem before if you have 2 or more variables that you want to sweep instead of writing range functions try to use sets
As far as I remember if you have two variables let say x and y, when you are filling the parameter values Comsol accept them as as a sets of 2
so if your parameters values are
10 20 40 50 60 70 80 90
Comsol first run the case when x =10 and y=20 in the second sweep x=40 y=50 and so on
Hope I understand the question and answer properly all the best
Please login with a confirmed email address before reporting spam
What if i have x= [1 2 3 4 5] and y =[6 7 8 9]
Now i want to have solution for say x=1 and all values of y and then for x=2 with all values of y and so on.
With your method I suppose to write all possible combination of pairs (x,y).
I appreciate your solution but unfortunately it is not solving the problem fully.
I think comsol should have some provision for this/
Thanks
Irfan
Please login with a confirmed email address before reporting spam
Please let me know if there is another solution
Please login with a confirmed email address before reporting spam
have you triesd to add two paametrc sweep nodes one after the other ? at least in v4.1 it seems to work
else you have 1 1 1 2 1 3 1 4 1 5 2 1 2 2 2 3 2 4 2 5 3 1 ...
but this might not work as normally the first parameter should be monotonously increasing, in which case in 3.5, if I remember right, we added a first dummy parameter just counting 1 2 3 4 ... and then the nested pairs.
but it was indeed 1.1 1.2. 1.3 then 2.1 2.2. 2.3 etc and in that oder
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Your idea of two sweep nodes working. Thanks for the advice, but I still think COMSOL should do some thing in single node for nested loop, otherwise the provision of having multiple parameters in single node seems useless.
Thanks Mustafa, I think the idea of Ivar is good for now.
Thanks
Irfan
Please login with a confirmed email address before reporting spam
Well send that as a suggestion to COMSOL,
Because, I'm not from COMSOL and have no more influence on the software more than you or anybody else out here. But I can say that the developers are listening to our suggestions, so when they are well explained and justified, I have noticed that they are taken into account and mostly arrive on the next release
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
to get more parametric sweep I used the same idea of Ivar. For now I think that is the best solution.
But I have another problem now. I'm doing another simulation and i wanna do a parametric sweep with wavelength fixed and changing the incidence angle. I have a single film (one cubic cell with periodic boundaries around), i put on this boundaries floquet periodicity, but i don't have the right solutions (i compared the transmittance curve with that one obtained by matlab). I'm using scattering boundary conditions on top and down (one of them with TE incidence wave).
Could anyone help me? In the attached file there is my project.
Thank you very much.
Attachments:
Please login with a confirmed email address before reporting spam
Thanks'.
Rino.
Please login with a confirmed email address before reporting spam
I do not have any problem when sweeping for one parameter (V1) but with two parameters ... I do not know how to do it ... I cannot get the solutions for the pairs (V1,V2) ... any suggestion ?
Thanks !
Please login with a confirmed email address before reporting spam
I also use this multiple parametric sweep method to find the stiffness curve of a geometry. My first parametric sweep gives displacement to the load point on the geometry and creates the x axis for my stiffness curve. I get the y axis values (force/displacement) by integration of reaction forces and I create a curve. The second parametric sweep is making some changes to the geometry to get a multitude of these curves.
My problem is that I have not been able to arrange the outcome of this solution into a matrix. I would like a stiffness matrix where the displacement is incremented in rows and setups for the geometry increment on columns. Because none of my sweeps create "inner solutions" I cannot do this. I only get one column that updates on the end of the first parametric sweep. Does anyone have a solution for this?
Thanks in advance,
Kerem Başaran
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
- FORUM Parametric sweep vs auxiliary sweep
- FORUM Using simultaneously a Parametric and a Function sweep
- BLOG How to Postprocess Fields over Arbitrary Geometries
- BLOG How to Calculate a Capacitance Matrix in COMSOL Multiphysics®
- KNOWLEDGE BASE Running parametric sweeps, batch sweeps, and cluster sweeps from the command line