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 interdependent studies - but I cannot use results from frequency domain study as input for stationary study
Posted 21.01.2013, 14:35 GMT-5 Low-Frequency Electromagnetics, RF & Microwave Engineering, Geometry, Materials, Mesh, Modeling Tools & Definitions, Parameters, Variables, & Functions, Results & Visualization, Studies & Solvers Version 4.3a 10 Replies
Please login with a confirmed email address before reporting spam
How can I use the result from a parametric (parameter 'b') sweep-frequency domain study (e.g. emw.Ez(b) ) in another function defined under Definitions (e.g. f(emw.Ez(b)) ) which is used as an input for a stationary study?
According to the results that I am getting, what is actually passed to the second study is ZERO.
Could you please send me a reference?
Or tell me how to shall I input the results from a study to another study?
Thanks a lot!
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
This is the model:
www.lilliu.co.uk/comsol/model2%20-%20pin%20diode%20-%20R27.mph
Study 1 contains a parametric sweep (incidence angle) and a frequency domain study. The resulting Poyinting vector is used as the input for a function defined in Model1->Definitions->Var1, which is:
G = multFactPower*(powerFlowDiv)/(c_const*h_plank/lambda_1)
powerFlow = abs(d(emw.Poavx, x)+d(emw.Poavy, y)+d(emw.Poavz, z))
where powerFlow is defined in Var2.
Study 2 contains two stationary steps. The first one involves just the electrostatics node (init), the second one involves an electrostatics node (es) and two transport of diluted species (cde, cdh). The variable G, which contains the solutions from Study 1 is an input for the transport of dilutes species, nodes Reactions 1 (in both of them).
The problem is that G is actually a function of: data Sets (can be Solution 6, Solution 1), frequency (just one) and angle (from the parametric sweep). In fact when you want to plot G, as shown in Results->Generation Rate (light) you chose these three parameters: solution, frequency and angle.
At the moment G is present in the reaction nodes, but how do I tell COMSOL that my G is actually:
G(Solution 6 - light parametric, freq, incidenceAngle) ?
At the moment the two Studies can be computed. However the result, which is shown in Results -> Current Density (voltage sweep) does not show any photogenerated current (J corresponding to V = 0) - it shows only saturation current.
As you can see from the plot Results-> Generation Rate (light) you have a plot of G, but also G_beer. The last one is calculated with the Beer-Lambert Law, and almost coincide to the G computed from my simulation. You can also add a small multiplication fact so that they match exactly, but this does not make any difference.
Now if you change the name to G_beer with G and you run again the two studies, you will notice that a photocurrent is actually present (should be something around 10mA/cm^2),
For this reason I am actually thinking that the function that is actually passed to the reaction terms is ZERO.
I was thinking that this could be due to the fact that G is defined as a local variable. However if you define a global variable as:
G = multFactPower*(powerFlowDiv)/(c_const*h_plank/lambda_1)
powerFlow = abs(d(mod1.emw.Poavx, x)+d(mod1.emw.Poavy, y)+d(mod1.emw.Poavz, z))
it does not change anything.
So, how can I pass:
G(Solution 6 - light parametric, freq, incidenceAngle)
to the second study?
Thanks in advance
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
Is the question complicated or stupid? I cannot find anything on the manual. Do you know anyone that could know the answer? Please let me know, and I'll send him a private message,
Thanks in advance
Please login with a confirmed email address before reporting spam
Dear Alexander, Can you open the file?
no, version mismatch.
In the Solver settings there is a "dependent variables" node. Try looking into it. There is a section in there where you specify if you want to use initial values from the previous solution.
Please login with a confirmed email address before reporting spam
Have you solve the problem?I have the same question,too.
Best
Please login with a confirmed email address before reporting spam
Have you solve the problem?I have the same question,too.
Best
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
- BLOG How to Model Magnetic Bearings in COMSOL Multiphysics®
- FORUM prescribed displacement/frequency domain study
- BLOG Your Guide to the Physics Interfaces and Studies in the RF Module
- KNOWLEDGE BASE How does COMSOL Multiphysics handle complex-valued numbers and problems in the frequency domain?
- FORUM Frequency domain study automatic plot export