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 create a function or variable based on results from component 1?

Please login with a confirmed email address before reporting spam

Hi all,

I am calculating the stress change due to several point loads in the subsurface designed mainly in component 1 (solid mechanics module). I am expecting to calculate some other parameters which are related to the stress tensor (sig11, sig12, sig13, etc) based on the results of those stress components from component 1. I have my own equations to accomplish the above calculation.

My questions are:

  1. Should I create a new component 2 and include those own-designed equations for following on calculations or should I just define a variable in global definitions in order to use results from component 1 (comp1.sig11?)?

  2. I have multiple points designed in the geometry. For each point, I have a loading force. Instead of manually adding several point load in the physics. Can I possibly adding different loading forces for different points automatically from reading a file? I can easily do this in matlab but I am a beginner in comsol. So I am looking for useful suggestions!

Thanks, Shanshan


1 Reply Last Post 1 mai 2019, 19:05 UTC−4
COMSOL Moderator

Hello Shanshan

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 6 years ago 1 mai 2019, 19:05 UTC−4

For your first point, if the quantities of interest can be computed without solving any other PDE than those already defined in component 1, there is no reason you would want to create a new one. The standard approach would be to create a variable group in your component, where you can enter your derivations.

About the second point, in many cases what you are trying to achieve can be done by adding an auxiliary sweep to the study step you use. Have you tried that yet?

For your first point, if the quantities of interest can be computed without solving any other PDE than those already defined in component 1, there is no reason you would want to create a new one. The standard approach would be to create a variable group in your component, where you can enter your derivations. About the second point, in many cases what you are trying to achieve can be done by adding an auxiliary sweep to the study step you use. Have you tried that yet?

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.