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.

Dependent variable definition

Please login with a confirmed email address before reporting spam


Dear all,

I am having trouble finding which variables the solver is solving for. I know that I can see all the variables if I activate the equation view. However, out of all these I am not sure which are the ones the solver is solving for. For instance, in the cylinder_flow.mph model there is an integral being applied to the resulting data set. However Comsol doesn't display which variables it is solving for.

I appreciate your comments, I have been looking at the manuals but can't find where this is explained,

Thanks a lot,

Lina


4 Replies Last Post Sep 3, 2013, 5:07 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 2, 2013, 4:01 a.m. EDT

Dear all,

I am having trouble finding which variables the solver is solving for. I know that I can see all the variables if I activate the equation view. However, out of all these I am not sure which are the ones the solver is solving for. For instance, in the cylinder_flow.mph model there is an integral being applied to the resulting data set. However Comsol doesn't display which variables it is solving for.

I appreciate your comments, I have been looking at the manuals but can't find where this is explained,

Thanks a lot,

Lina


I just looked at the model you mentioned, "cylinder_flow.mph". Under the node "Laminar flow" you have the title "Dependent Variables". Expanding it gives the list of those. In the pdf manual the use of Integral 1 is described: Drag coefficient is calculated along the cylinder surface, see 1D Plot Group 4. Under "Data Sets" only the edge where drag coefficient is to be plotted is defined via "Integral". It is a bit confusing that you have to define the circumference like this. But now you can take any imaginable variable or quantity which you wish to look at on the cylinder circumference.

Am I replying to the right question?
BR
Lasse
[QUOTE] Dear all, I am having trouble finding which variables the solver is solving for. I know that I can see all the variables if I activate the equation view. However, out of all these I am not sure which are the ones the solver is solving for. For instance, in the cylinder_flow.mph model there is an integral being applied to the resulting data set. However Comsol doesn't display which variables it is solving for. I appreciate your comments, I have been looking at the manuals but can't find where this is explained, Thanks a lot, Lina [/QUOTE] I just looked at the model you mentioned, "cylinder_flow.mph". Under the node "Laminar flow" you have the title "Dependent Variables". Expanding it gives the list of those. In the pdf manual the use of Integral 1 is described: Drag coefficient is calculated along the cylinder surface, see 1D Plot Group 4. Under "Data Sets" only the edge where drag coefficient is to be plotted is defined via "Integral". It is a bit confusing that you have to define the circumference like this. But now you can take any imaginable variable or quantity which you wish to look at on the cylinder circumference. Am I replying to the right question? BR Lasse

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 2, 2013, 12:32 p.m. EDT

Hi Lasse,

Many thanks for your reply. I have some figures explaining my question a little better in another post:

www.comsol.com/community/forums/general/thread/39212/

I am aware of the dependent variables section, however:

*The solution data set doesn't have any explicit output variables, all that is visible in the solution node is 'solver, model, frame angle and scale factor', in the same way, the integral input is labeled as solution1 without any explicit detail of what is being integrated. Therefore, I don't know if the entire solution (the entire set of dependent variables) is being integrated as a result of the integral or if there is a way to visualize which variables are being integrated, or if I should look for these variables in some other node.

*The drag is calculated using 'reacf(u)' which is the reaction force resulting from the integral, which I assume is integrating fluid pressure along the chosen circumference. However, yet again this is my assumption of what is being integrated, I don't know where these integrand quantities are specifically defined. I ran the cylinder_flow simulation without the integral and neither the reacf(u) nor reacf(v) were created, i.e. Where can I find reacf(u) and reacf(v) as an output quantity?

I might be missing out on something here, or it could be very obvious, in any event I appreciate any comments that will help clarify these aspects of function input/output post processing in comsol.

Thank you for your comments,

Lina








Hi Lasse, Many thanks for your reply. I have some figures explaining my question a little better in another post: http://www.comsol.com/community/forums/general/thread/39212/ I am aware of the dependent variables section, however: *The solution data set doesn't have any explicit output variables, all that is visible in the solution node is 'solver, model, frame angle and scale factor', in the same way, the integral input is labeled as solution1 without any explicit detail of what is being integrated. Therefore, I don't know if the entire solution (the entire set of dependent variables) is being integrated as a result of the integral or if there is a way to visualize which variables are being integrated, or if I should look for these variables in some other node. *The drag is calculated using 'reacf(u)' which is the reaction force resulting from the integral, which I assume is integrating fluid pressure along the chosen circumference. However, yet again this is my assumption of what is being integrated, I don't know where these integrand quantities are specifically defined. I ran the cylinder_flow simulation without the integral and neither the reacf(u) nor reacf(v) were created, i.e. Where can I find reacf(u) and reacf(v) as an output quantity? I might be missing out on something here, or it could be very obvious, in any event I appreciate any comments that will help clarify these aspects of function input/output post processing in comsol. Thank you for your comments, Lina

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 3, 2013, 2:36 a.m. EDT

Hi Lasse,

Many thanks for your reply. I have some figures explaining my question a little better in another post:

www.comsol.com/community/forums/general/thread/39212/

I am aware of the dependent variables section, however:

*The solution data set doesn't have any explicit output variables, all that is visible in the solution node is 'solver, model, frame angle and scale factor', in the same way, the integral input is labeled as solution1 without any explicit detail of what is being integrated. Therefore, I don't know if the entire solution (the entire set of dependent variables) is being integrated as a result of the integral or if there is a way to visualize which variables are being integrated, or if I should look for these variables in some other node.

*The drag is calculated using 'reacf(u)' which is the reaction force resulting from the integral, which I assume is integrating fluid pressure along the chosen circumference. However, yet again this is my assumption of what is being integrated, I don't know where these integrand quantities are specifically defined. I ran the cylinder_flow simulation without the integral and neither the reacf(u) nor reacf(v) were created, i.e. Where can I find reacf(u) and reacf(v) as an output quantity?

I might be missing out on something here, or it could be very obvious, in any event I appreciate any comments that will help clarify these aspects of function input/output post processing in comsol.

Thank you for your comments,

Lina


Dear Lina

As far as I understand, the solutions contains the values of all the variables given in the Dependent Variables section. And you can create new variables from those. I have sometimes been pondering what is the Comsol name of a variable (like 'spf.nu'). The integral under Results -> Data set just defines the cylinder circumference over which the drag coefficient is summed (= integrated) in 1D Plot Group 4. It could be any mathematical expression, Integral 1 is only the "platform" where the integral operation is carried out. Reacf is - according to my understanding - a built-in function in Comsol, you do not create it. But here I am also on thin ice, you'd better check this forum with the keyword 'reacf'. I have stopped using it in my electrochemical problems, i.e. when calculating the current at an electrode, as it gives less accurate results than not using it ;)

Just for fun, I defined "Edge 2D 1" as the circumference of the cylinder, created a "1D Plot Group 5" and plotted the drag coefficient along the circumference at all time points, see the attached figure.

I am not sure if I am helping at all...
BR
Lasse
[QUOTE] Hi Lasse, Many thanks for your reply. I have some figures explaining my question a little better in another post: http://www.comsol.com/community/forums/general/thread/39212/ I am aware of the dependent variables section, however: *The solution data set doesn't have any explicit output variables, all that is visible in the solution node is 'solver, model, frame angle and scale factor', in the same way, the integral input is labeled as solution1 without any explicit detail of what is being integrated. Therefore, I don't know if the entire solution (the entire set of dependent variables) is being integrated as a result of the integral or if there is a way to visualize which variables are being integrated, or if I should look for these variables in some other node. *The drag is calculated using 'reacf(u)' which is the reaction force resulting from the integral, which I assume is integrating fluid pressure along the chosen circumference. However, yet again this is my assumption of what is being integrated, I don't know where these integrand quantities are specifically defined. I ran the cylinder_flow simulation without the integral and neither the reacf(u) nor reacf(v) were created, i.e. Where can I find reacf(u) and reacf(v) as an output quantity? I might be missing out on something here, or it could be very obvious, in any event I appreciate any comments that will help clarify these aspects of function input/output post processing in comsol. Thank you for your comments, Lina [/QUOTE] Dear Lina As far as I understand, the solutions contains the values of all the variables given in the Dependent Variables section. And you can create new variables from those. I have sometimes been pondering what is the Comsol name of a variable (like 'spf.nu'). The integral under Results -> Data set just defines the cylinder circumference over which the drag coefficient is summed (= integrated) in 1D Plot Group 4. It could be any mathematical expression, Integral 1 is only the "platform" where the integral operation is carried out. Reacf is - according to my understanding - a built-in function in Comsol, you do not create it. But here I am also on thin ice, you'd better check this forum with the keyword 'reacf'. I have stopped using it in my electrochemical problems, i.e. when calculating the current at an electrode, as it gives less accurate results than not using it ;) Just for fun, I defined "Edge 2D 1" as the circumference of the cylinder, created a "1D Plot Group 5" and plotted the drag coefficient along the circumference at all time points, see the attached figure. I am not sure if I am helping at all... BR Lasse


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Sep 3, 2013, 5:07 p.m. EDT

Dear Lasse,

Thank you for your comments. I don't think the integration is giving the Cd directly, the Cd coefficient is calculated using reacf(u) which is created after the integral evaluation of the data set. The reacf(u) variable is not created if the integration is not executed. I ran the model without the integral and the model didn't generate reacf(u) and therefore didn't generate the Cd plots. The 'reacf' variables however are available on the default structures module, in the CFD module however they don't appear by default.

Therefore the question was more along the lines of how do I know which variables are created after integrating the 'data set' solution 1. As you pointed out, there are several variables which are being solved for as shown in the equation view section of the physics but for functions like integration it is not clear to me which variables are generated or where they are stored if applied to the 'data set'.

I think I will look into the Livelink interface and see if I can find which variables are created after each operation and where they are stored in the solution data.

Another way I could pose the question would be: how to disect and access the 'data set', I think one of the solutions is exporting the data, however, this again is a visualization method and doesn't make the actual solution tag names explicit.

Best regards,

Lina





Dear Lasse, Thank you for your comments. I don't think the integration is giving the Cd directly, the Cd coefficient is calculated using reacf(u) which is created after the integral evaluation of the data set. The reacf(u) variable is not created if the integration is not executed. I ran the model without the integral and the model didn't generate reacf(u) and therefore didn't generate the Cd plots. The 'reacf' variables however are available on the default structures module, in the CFD module however they don't appear by default. Therefore the question was more along the lines of how do I know which variables are created after integrating the 'data set' solution 1. As you pointed out, there are several variables which are being solved for as shown in the equation view section of the physics but for functions like integration it is not clear to me which variables are generated or where they are stored if applied to the 'data set'. I think I will look into the Livelink interface and see if I can find which variables are created after each operation and where they are stored in the solution data. Another way I could pose the question would be: how to disect and access the 'data set', I think one of the solutions is exporting the data, however, this again is a visualization method and doesn't make the actual solution tag names explicit. Best regards, Lina

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.