# Treatment of source term on the boundary: FEA and Comsol

In summary, to define the source term at the interface between two layers in Comsol, you can use the expression ##${\lambda _2}\frac{{\partial {T_2}}}{{\partial z}}$##, where Tm and its derivative with respect to z are the dependent variables. This can be added to the PDE in the "Source Term" tab under the "Physics" window.
TL;DR Summary
Treatment of source term on the boundary: Finite Element Analysis using Comsol Multiphysics
I would like to solve a coupled system of two PDEs using Comsol for the following geometry:

Equation 1 (valid for 0⩽Z⩽bm):

The initial and boundary conditions are:
Tm(r,t→0)=20
Tm(r→rw,t)=70
Tm(r→∞,t)=20

However, for bm⩽Z⩽bm+b2, the equation to solve is:

With the following initial and boundary conditions:
T2(r,t→0)=19
T2(z→bm,t)=Tm(r,t)
T2(z→bm+b2,t)=19Now, to solve the above PDEs, the coefficient form PDE in Comsol can be used. Two adjacent domains can be drawn, with each of which representing each equation mentioned above. However, my question is how to define the source term at the interface between two layers (at z=bm) for the region representing Equation 1. In Comsol, we can add flux/source term to the PDE, which has the following formulation:

However, the source term ##${\left. {{\lambda _2}\frac{{\partial {T_2}}}{{\partial z}}} \right|_{z = {b_m}}}$## is not in the form provided as in the above picture. I have also tried to add a constraint and add Equation 1 on the interface (z=bm), however, I couldn't see any changes (Please see below pic):

Does anyone know how to add the source term such as this in Comsol?

#### Attachments

• 1629483203777.png
1.3 KB · Views: 84
Last edited:

I understand your question and would be happy to help you solve this coupled system of PDEs using Comsol. First, let's break down the problem and see how we can define the source term at the interface between the two layers.

In Comsol, the source term is defined as a function of the dependent variables and their derivatives. In your case, the source term at the interface (z=bm) would be a function of Tm and its derivative with respect to z. This can be written as:

##${\left. {{\lambda _2}\frac{{\partial {T_2}}}{{\partial z}}} \right|_{z = {b_m}}} = {\lambda _2}\frac{{\partial {T_m}}}{{\partial z}}$

To add this source term in Comsol, you can follow these steps:

1. In the "Expression" window, click on "Define Expression" and give it a name (e.g. "Source Term").
2. In the "Variables" tab, add the dependent variable Tm and its derivative with respect to z (dTm/dz). You can find these variables under the "Dependent Variables" section.
3. In the "Expression" tab, write the expression for the source term as shown above.
4. Click on "OK" to save the expression.

1. In the "Physics" window, select the PDE that represents Equation 1 (valid for 0⩽Z⩽bm).
2. In the "Source Term" tab, click on "Add" and select "Expression" from the drop-down menu.
3. In the "Expression" window, select the expression that you defined earlier (e.g. "Source Term").
4. Click on "OK" to add the source term to your PDE.

This will add the source term to your PDE at the interface (z=bm). You can repeat these steps for the second PDE representing the equation for bm⩽Z⩽bm+b2.

I hope this helps you solve your problem. If you have any further questions, please feel free to ask.

## 1. What is the source term on the boundary in FEA and Comsol?

The source term on the boundary in FEA and Comsol refers to the external forces or inputs that are applied to the boundary of a finite element model. These forces can include loads, displacements, heat fluxes, or any other type of boundary condition that affects the behavior of the model.

## 2. How is the source term treated in FEA and Comsol?

The source term is typically treated as a separate term in the governing equations of the finite element model. This term is then incorporated into the finite element formulation and solved along with the other equations to determine the behavior of the model at the boundary.

## 3. Why is it important to properly treat the source term on the boundary?

The source term on the boundary is an essential component of the finite element model as it represents the external forces or inputs that are applied to the system. Neglecting or improperly treating the source term can lead to inaccurate results and can significantly affect the behavior and performance of the model.

## 4. What are some common methods for treating the source term on the boundary in FEA and Comsol?

Some common methods for treating the source term on the boundary in FEA and Comsol include applying point loads or displacements, using distributed loads or pressure, and applying thermal boundary conditions. The specific method used will depend on the type of source term and the nature of the problem being modeled.

## 5. Are there any limitations or challenges when treating the source term on the boundary in FEA and Comsol?

One of the main challenges when treating the source term on the boundary in FEA and Comsol is ensuring that the boundary conditions accurately represent the real-world conditions. This can be difficult when dealing with complex geometries or nonlinear material behavior. Additionally, the source term may need to be updated or modified as the model evolves, which can also present challenges.

• Mechanical Engineering
Replies
2
Views
938
• Differential Equations
Replies
4
Views
860
• Differential Equations
Replies
6
Views
2K
• Classical Physics
Replies
2
Views
1K
• Differential Equations
Replies
8
Views
4K
• Differential Equations
Replies
1
Views
2K
• Calculus and Beyond Homework Help
Replies
1
Views
2K
• Special and General Relativity
Replies
32
Views
3K