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

Please login with a confirmed email address before reporting spam

Dear all,

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!


10 Replies Last Post 2013年5月12日 GMT-4 23:10

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月22日 GMT-5 04:59
Too hard question?
Too hard question?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月22日 GMT-5 12:45
it would be helpful if you attach the model
it would be helpful if you attach the model

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月22日 GMT-5 14:41
Dear Alexander,

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
Dear Alexander, This is the model: http://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

Posted: 1 decade ago 2013年1月22日 GMT-5 16:57
your link is broken: "The requested URL /comsol/model2...n ​diode - R27.mph was not found on this server."
your link is broken: "The requested URL /comsol/model2...n ​diode - R27.mph was not found on this server."

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月22日 GMT-5 17:51
www.lilliu.co.uk/comsol/model2%20-%20pin%20diode%20-%20R27.mph
http://www.lilliu.co.uk/comsol/model2%20-%20pin%20diode%20-%20R27.mph

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月23日 GMT-5 07:11
Dear Alexander, Can you open the file?


Dear Alexander, Can you open the file?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年1月25日 GMT-5 02:11
Dear all,

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
Dear all, 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

Posted: 1 decade ago 2013年1月25日 GMT-5 12:36

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.
[QUOTE] Dear Alexander, Can you open the file? [/QUOTE] 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

Posted: 1 decade ago 2013年5月12日 GMT-4 23:10
Hi,
Have you solve the problem?I have the same question,too.
Best
Hi, Have you solve the problem?I have the same question,too. Best

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2013年5月12日 GMT-4 23:10
Hi,
Have you solve the problem?I have the same question,too.
Best
Hi, 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.