Introduction to the event interface in COMSOL 1, displaying events


foreword

This article mainly introduces a COMSOL interface - Events (Events) learned in the simulation of electromagnetic field and temperature field recently, which includes two kinds of explicit events and implicit events. The explicit event processing knows the specific time of the load change, while the implicit event processing does not know the specific time of the load change, but it can be the monitoring of physical quantities such as temperature. I think there are quite a lot of scenarios where this interface is applied. If you are interested, please continue reading.


1. Problem description

I am solving a transient model where the loads change instantaneously, but the solver seems to ignore these changes in the loads. How can I make the solver correctly identify the load change times? For example, in the combination of the electromagnetic field and the temperature field, the change of the electromagnetic field is very fast, but the change of the temperature is a cumulative process. Sometimes it takes tens of minutes or hours of simulation to reach the equilibrium state. If the solution is set according to the electromagnetic field The step size would result in a very large solution, whereas setting the solution step size by the temperature field imposes a relatively short-duration impulse load on the model that may be skipped by the software unless very tight solver tolerances are used.

2. Interface introduction

  • In such cases, we can inform the solver of this instantaneous load change, which can be done through the event interface .
  • This interface is added to the model by adding physics: Mathematics > Ordinary Differential and DAE Interfaces > Events . The event interface consists of four characteristics: discrete state, indicator state, explicit event, and implicit event . When the event is fired, by default it will initialize all variables consistently from the previous solution and the new loads. If you want some (or all) discrete state, global, or field variables to mutate, you can choose to reinitialize them to different values.
  • Below I will introduce a simple model.

1. Model description

A cuboid, width: 1cm, depth: 1cm, height: 0.1cm. The top surface is naturally convected, and the bottom surface is periodically heated.
Alt
As can be seen from the figure below, the cuboid has undergone several consecutive heatings. In the second picture, every 3 seconds is a cycle, heating for the first 1 second, and cooling naturally for the next 2 seconds, which can be realized by using display events . This feature is often used in conjunction with the Discrete State feature, which is used to modify boundary conditions. At the same time, event cycles can be specified to model regularly repeated load changes. If a repetitive pulsed heat load has been applied, two explicit events can be used: one triggered at the opening time and the other at the closing time.

2. Modeling process

1. Discrete state defines a state variable that can change when an event is triggered.
The discrete state interface defines a state variable that can change when an event fires
2. Discrete states can be used to modify thermal loads.
insert image description here
3. Explicit event 1 reinitializes the discrete state to open the load.
insert image description here
4. Explicit event 2 reinitializes the discrete state to close the load.
insert image description here

3. View the help documentation

If you are unclear, you can right-click the event interface to view the help document, or you can view the help document under the COMSOL installation directory. For specific operations, please refer to the article shared by COMSOL beginners.
insert image description here


Summarize

The above introduces a little application of display events in periodic pulse thermal loads. The main advantage is that it acts on the solver, so that the change of load cannot be ignored. If you want to deepen your understanding, you can also search for the keywords of thermostat on the official website to learn . At the same time, the next article will introduce a model of implicit events , hoping to help you.

Guess you like

Origin blog.csdn.net/qq_38348202/article/details/127022332