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.

How to set boundary conditions from parametric solver

Please login with a confirmed email address before reporting spam

hello,

We want to successivly run a DC_model by changing only some boundary conditions (i.e. current density on a face) on only some geometric objects (i.e. electrods).
We want to use parametric solver to perform this operation. For that:
We tried to group together boundaries in Options/Boundary Expressions and linked them to a variable. This variable was defined in Options/Constant as a value of current density. In the menu Solve/parametric sweep, we typed in the window "parametric name" the group name of the boundaries we want to change value. In the window "parametric value" we typed the constant name which represents the value of current density.
But it doesn't work! help!!

Thanks for your help


3 Replies Last Post 4 mars 2014, 16:37 UTC−5
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 12 mars 2010, 15:55 UTC−5
Hi

My way (there are many) is to define a variable "param" as range(0,0.1,1) (typically from 0 to 1) and then I multiply the amplitude of my signal by "*param".

So if you have several electrodes, and you have grouped them into a "group" you can define a BC (boundary condition) as Voltage = Vamplitude*param (Vamplitude being defined i.e. in the Constants as Vamplitude = 10[V] or whateverfits you) and normally off you go

But you can also define the parameter directly as a voltage value, just check the units, as noramlly the parameter is unitless

And when thing fails, try it out on the simplest model you can imagine, to learn the principle behind, one often fails because of the complexity of the multiphysics, its not always just to jump in and "play winner"

Good luck
Ivar
Hi My way (there are many) is to define a variable "param" as range(0,0.1,1) (typically from 0 to 1) and then I multiply the amplitude of my signal by "*param". So if you have several electrodes, and you have grouped them into a "group" you can define a BC (boundary condition) as Voltage = Vamplitude*param (Vamplitude being defined i.e. in the Constants as Vamplitude = 10[V] or whateverfits you) and normally off you go But you can also define the parameter directly as a voltage value, just check the units, as noramlly the parameter is unitless And when thing fails, try it out on the simplest model you can imagine, to learn the principle behind, one often fails because of the complexity of the multiphysics, its not always just to jump in and "play winner" Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 mars 2010, 07:07 UTC−4
Hello

We have understood how define the parameters of the solver to associate as boundary conditions as parameters. For example, if we take param1=1 param2=0 param3=-1, we can fix a current entering on a first border, an electric insulation on the second and an outgoing current on the third. Thus, the problem will be solved for these boundary conditions. If we add three new values in the window parameter value, Comsol will start up a second resolution, ect…
But in our case, we would wish to associate a set of 1064 boundary conditions (or less if we are able to group them by function: current entering, outgoing, insulation…)with only one value parameter. For that, parameter would be the number of a line of matrix made up of 1064 values. These data could be in an additional file that we call in the window parameter sweep or could be generated by a function connecting a number of parameter has a set of number of border.

It is this passage which we do not manage to format in Comsol.

Thanks for your help!
Hello We have understood how define the parameters of the solver to associate as boundary conditions as parameters. For example, if we take param1=1 param2=0 param3=-1, we can fix a current entering on a first border, an electric insulation on the second and an outgoing current on the third. Thus, the problem will be solved for these boundary conditions. If we add three new values in the window parameter value, Comsol will start up a second resolution, ect… But in our case, we would wish to associate a set of 1064 boundary conditions (or less if we are able to group them by function: current entering, outgoing, insulation…)with only one value parameter. For that, parameter would be the number of a line of matrix made up of 1064 values. These data could be in an additional file that we call in the window parameter sweep or could be generated by a function connecting a number of parameter has a set of number of border. It is this passage which we do not manage to format in Comsol. Thanks for your help!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 4 mars 2014, 16:37 UTC−5
Nolwenn, did you ever figure out how to sweep through different electrodes in your model? I have a set combination of current point sources and sinks that I wish to apply in my model, and I wonder whether a parametric sweep can help me do this quickly. I am currently running all ~320 combinations using the Matlab livelink, but it's slow, and I wonder whether using a parametric sweep would speed up some of the model setup for each new combination.
Nolwenn, did you ever figure out how to sweep through different electrodes in your model? I have a set combination of current point sources and sinks that I wish to apply in my model, and I wonder whether a parametric sweep can help me do this quickly. I am currently running all ~320 combinations using the Matlab livelink, but it's slow, and I wonder whether using a parametric sweep would speed up some of the model setup for each new combination.

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.