Disabling variables in study step

Sayee Srikarah Volaity

Please login with a confirmed email address before reporting spam

I am working on a heat transfer problem that requires me to calculate a variable (let's call it X, defined in "Variables 1") as the first step. X is defined as 2Y - 10, where Y is a state variable (defined in "State Variables 1") that is being updated after each timestep. In the second study step, I need to use the last computed value of the variable X in the physics and solve again. Which means that the variables should not be solved for in the second step.

I am implementing a two study scheme, where in study 1, I run the physics while computing X and Y. In study 2, I am disabling "Variables 1" and "State Variables 1", and setting the values of the variables not computed for through the previous solution. When I run this, the first study runs successfully, but the second study throws an error saying variable X is not defined. I understand that this might be because I am disabling the variables in the study, but I am not sure how else to not solve for the variable and state variable in the second study, while still using the last stored values.

Would be of great help if anyone can guide me to implement it properly.

Thanks!


2 Replies Last Post 2024年5月16日 GMT+2 01:14
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 months ago 2024年5月14日 GMT+2 09:42

If you disable those nodes, the variables created in that node are no longer defined. The correct approach is to modify the solver settings so that the state variable is not solved for in the second study, That is, deselect theSolve for this fieldcheckbox for the state variable node underDependent Variables.

-------------------
Henrik Sönnerlind
COMSOL
If you disable those nodes, the variables created in that node are no longer defined. The correct approach is to modify the solver settings so that the state variable is not solved for in the second study, That is, deselect the **Solve for this field** checkbox for the state variable node under **Dependent Variables**.

Sayee Srikarah Volaity

Please login with a confirmed email address before reporting spam

Posted: 4 months ago 2024年5月16日 GMT+2 01:14

Thank you very much!

Thank you very much!

Reply

Please read thediscussion forum rulesbefore posting.

Pleaselog into post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL®software users who are on-subscription should submit their questions via theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map