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 May 15, 2024, 7:14 p.m. EDT
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 7 days ago May 14, 2024, 3:42 a.m. EDT

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.

-------------------
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: 5 days ago May 15, 2024, 7:14 p.m. EDT

Thank you very much!

Thank you very much!

Reply

Please read the discussion forum rules before posting.

Please log in to 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 the Support Center for a more comprehensive response from the Technical Support team.