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.

How to pass result from one module in to another module.

Alberto Garcia-Cristobal

Please login with a confirmed email address before reporting spam

HI All


I am working in two modules, Structural mechanics and Electrostatics. I want to pass the result of the Structural mechanics module as input in to the Electrostatic module.

For example: I want to pass the Strain rest 'solid.eX' from the SM module into Electrostatic module as input.
but I am having problem with it.


Regards
A.

3 Replies Last Post 04.02.2013, 14:05 GMT-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 04.02.2013, 10:06 GMT-5
Hi

once a model is solved the variables are defined as "solid.something", or "ec.something" or ..., that is a way to access them selectively. If they are from 2 different models, you must add mod1.solid.something and mod2.ec.something. But be sure you take global values, or that they can point back to a identical geometry & topology if you mix models and connect fields.

The solver tab "Values of Dependent Variables" is there to set the initial values of one case to be used by the next

--
Good luck
Ivar
Hi once a model is solved the variables are defined as "solid.something", or "ec.something" or ..., that is a way to access them selectively. If they are from 2 different models, you must add mod1.solid.something and mod2.ec.something. But be sure you take global values, or that they can point back to a identical geometry & topology if you mix models and connect fields. The solver tab "Values of Dependent Variables" is there to set the initial values of one case to be used by the next -- Good luck Ivar

Alberto Garcia-Cristobal

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.02.2013, 11:06 GMT-5
Dear Ivar


Thank you of your reply.

What I want to do is, to use the result of first module,SM module, and use it in variable definition of the second module,electrostatic module.

My first module is the SM module so I went to the study tab and set '' second module and set

''Values of Dependent Variables" into 'solution' and 'study one'

Finally I used the result of first module in the variable definition of the second module but still I have problems b/c the solutions from the first module are not recognized in the second module



Regard
A
Dear Ivar Thank you of your reply. What I want to do is, to use the result of first module,SM module, and use it in variable definition of the second module,electrostatic module. My first module is the SM module so I went to the study tab and set '' second module and set ''Values of Dependent Variables" into 'solution' and 'study one' Finally I used the result of first module in the variable definition of the second module but still I have problems b/c the solutions from the first module are not recognized in the second module Regard A

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 04.02.2013, 14:05 GMT-5
Hi
They should be (recognised) but, only variales with the same common name and I'm not sure there are that many of those variables between those two physics !

As Solid solves for _u_ the displacements, and ES for V the voltage. Now a force from ES can be couples as a boundary load to Solid, but that you fix in the boundary tab of ES (define the body force) and Solid at the force BC tab level. Then you can always define formulas as links, integration or variable references from one physics to another.

However, if you have enough RAM it's often better (quicker) to solve both physics with a direct solver (if possible)

There are several examples in the model library about manually coupling different physics

--
Good luck
Ivar
Hi They should be (recognised) but, only variales with the same common name and I'm not sure there are that many of those variables between those two physics ! As Solid solves for _u_ the displacements, and ES for V the voltage. Now a force from ES can be couples as a boundary load to Solid, but that you fix in the boundary tab of ES (define the body force) and Solid at the force BC tab level. Then you can always define formulas as links, integration or variable references from one physics to another. However, if you have enough RAM it's often better (quicker) to solve both physics with a direct solver (if possible) There are several examples in the model library about manually coupling different physics -- 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.