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.

Two consecutive physics simulations

Please login with a confirmed email address before reporting spam

I'd like to run one physics simulation (solve for 2D electric field given a particular electrode geometry), and then use the output of the first simulation (the electric field distribution) to input into the second simulation's material properties.

In other words, I solve for electric field and then I know electric field at every point in space. Next I take this electric field and use it to define the refractive index in the second simulation. (Refractive index is usually just a material property and is fixed and just one number for all spatial points that are composed of that material, rather than variable spatially.)

How would I do this? I've been poking around for a while but can't figure out how to (A) run a second simulation using the first simulation's output, and (B) make a material property like refractive index be spatially dependent.

Thanks

4 Replies Last Post 17 lug 2013, 09:14 GMT-4
Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 lug 2013, 17:01 GMT-4
David-

A) First, add a 2nd study (right-click root node and select Study and use Model Wizard to select study type), then in the settings window under Step 1, expand "Values of Dependent Variables." Check the box, Values of variables not solved for. Change the Method to Solution. Change the Study to Study 1. This will point Study 2 to the E field from Study 1. You will also need to make sure that you have coupled the physics (ie variables) under the physics interface nodes. See Model library for many examples of how to couple physics.

B) Well, don't you want to make the refractive index, Electric field dependent? Simply, type in your functional dependence into the edit field for refractive index. Say 4.23*sqrt(Ex^2+Ey^2+Ez^2) for example. Ex, Ey, Ez are the vector components of the electric field dependent variable. COMSOL is nice that anywhere you can type a number you can type a function or a parameter or an expression.

Best regards,
Josh Thomas
AltaSim Technologies

David- A) First, add a 2nd study (right-click root node and select Study and use Model Wizard to select study type), then in the settings window under Step 1, expand "Values of Dependent Variables." Check the box, Values of variables not solved for. Change the Method to Solution. Change the Study to Study 1. This will point Study 2 to the E field from Study 1. You will also need to make sure that you have coupled the physics (ie variables) under the physics interface nodes. See Model library for many examples of how to couple physics. B) Well, don't you want to make the refractive index, Electric field dependent? Simply, type in your functional dependence into the edit field for refractive index. Say 4.23*sqrt(Ex^2+Ey^2+Ez^2) for example. Ex, Ey, Ez are the vector components of the electric field dependent variable. COMSOL is nice that anywhere you can type a number you can type a function or a parameter or an expression. Best regards, Josh Thomas AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 lug 2013, 21:16 GMT-4
Thanks Josh

For B, I understand now.

For A: I have COMSOL 4.3a and the steps you describe are not working. Please find attached a simulation with only electrostatics (es). Basically there are two electrodes and this solves for the electric field between them.

Next I right click the root node and select Add Study as you say. However I don't see the electromagnetic waves (emw) option because that involves different physics. There is only "Stationary", "Time dependent", etc. I am looking for the emw's "Mode analysis" which appears under this list when I make a new emw simulation but not here now. So instead I right click the root node again and select Add Model. I can then add the "emw" but this does not seem to be correct either as it is an entirely separate model.

Thanks
Thanks Josh For B, I understand now. For A: I have COMSOL 4.3a and the steps you describe are not working. Please find attached a simulation with only electrostatics (es). Basically there are two electrodes and this solves for the electric field between them. Next I right click the root node and select Add Study as you say. However I don't see the electromagnetic waves (emw) option because that involves different physics. There is only "Stationary", "Time dependent", etc. I am looking for the emw's "Mode analysis" which appears under this list when I make a new emw simulation but not here now. So instead I right click the root node again and select Add Model. I can then add the "emw" but this does not seem to be correct either as it is an entirely separate model. Thanks


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 lug 2013, 21:18 GMT-4
Secondly, you say "You will also need to make sure that you have coupled the physics (ie variables) under the physics interface nodes." What do you mean by "physics interface nodes"? Which nodes in the node tree are you referring to? If I knew which ones to look at then I could perhaps find some examples in model library but I don't know what you mean.
Thanks
Secondly, you say "You will also need to make sure that you have coupled the physics (ie variables) under the physics interface nodes." What do you mean by "physics interface nodes"? Which nodes in the node tree are you referring to? If I knew which ones to look at then I could perhaps find some examples in model library but I don't know what you mean. Thanks

Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 lug 2013, 09:14 GMT-4
To add more physics (ie physics interface nodes) to the Model tree, you will need to right-click on Model 1 to reopen the Model Wizard. At this time, you can also add a 2nd study.

The physics interface nodes are the nodes in the Model Builder tree under the Model branch found directly below the Materials node. You can have multiple physics interface nodes in a model. These physics interface nodes define equations on domains, boundaries, etc. If you have multiple nodes in the Model (ie sets of equations), you need to make sure they are communicating properly with each other where there are couplings.

Best,
Josh
To add more physics (ie physics interface nodes) to the Model tree, you will need to right-click on Model 1 to reopen the Model Wizard. At this time, you can also add a 2nd study. The physics interface nodes are the nodes in the Model Builder tree under the Model branch found directly below the Materials node. You can have multiple physics interface nodes in a model. These physics interface nodes define equations on domains, boundaries, etc. If you have multiple nodes in the Model (ie sets of equations), you need to make sure they are communicating properly with each other where there are couplings. Best, Josh

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.