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.

How to create a function of the derivatives of my variables?

Please login with a confirmed email address before reporting spam

I am very new to working with COMSOL, so sorry if this seems like a trivial question. I am considering the Navier-Stokes equation, which is coupled with another PDE by an additional stress tensor:

This stress tensor is dependent on the solution (and derivatives) of another PDE, which is denoted . Explicitly is given by

The tensor satisfies its own PDE. I know how to impliment this additional model type. I am having problems with coupling it to the Navier-Stokes model.

I have the following questions, if any of them would be answered I would be happy. 1. The COMSOL Laminar flow model does not permit an additional stress tensor, is there a way to change this or would I have to enter manually into the forcing term? 2. What is the best way for COMSOL to compute and utilise ? I know that I can create analytic functions, but in those models I seem to have to explictly input the derivatives of the model, eg. I cannot write An1(a,b) = b(ax)^2 + a(by)^3, I would have to write An1(a,b,ax,by) = b(ax)^2 + a(by)^3.


2 Replies Last Post Apr 7, 2022, 11:46 a.m. EDT
Mats Nigam COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Apr 7, 2022, 11:16 a.m. EDT
Updated: 2 years ago Apr 7, 2022, 11:16 a.m. EDT

Dear Aron,

The easiest way to add the term would be to add it as a volume force. This way it would automatically be included in the consistent stabilization. However, you would need a high-order discretization for , since you need to represent third-order derivatives in the momentum equation. Another way would be to add the additional stress as a weak contribution which you could integrate by parts to lower the order. You may also have to add boundary contributions on non-Dirichlet boundaries. You could also add a dependent variable for and solve for it. This way you could reduce the discretization order further by integrating the terms by part, assuming you know the Neumann condition for .

Dear Aron, The easiest way to add the term would be to add it as a volume force. This way it would automatically be included in the consistent stabilization. However, you would need a high-order discretization for Q, since you need to represent third-order derivatives in the momentum equation. Another way would be to add the additional stress as a weak contribution which you could integrate by parts to lower the order. You may also have to add boundary contributions on non-Dirichlet boundaries. You could also add a dependent variable for \sigma and solve for it. This way you could reduce the discretization order further by integrating the \Delta Q terms by part, assuming you know the Neumann condition for Q.

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Apr 7, 2022, 11:46 a.m. EDT

I have tried the dependent variable aspect to the problem, but I have encountered a little bit of a road block in the stability issue department because (and I am sorry that I forgot to mention this) but is coupled with in the following way

I think the approach that I am going to take, is to Compute N-S without the stress tensor, use that data to compute the Q-tensor, use that to compute the stress tensor and then go back and forth between solving the two models.

I have tried the dependent variable aspect to the problem, but I have encountered a little bit of a road block in the stability issue department because (and I am sorry that I forgot to mention this) but Q is coupled with \textbf{u} in the following way \frac{\partial Q}{\partial t}+(\textbf{u}\cdot \nabla)Q=\frac{1}{\sqrt{2}}\Lambda|Q|(\nabla \textbf{u} + (\nabla \textbf{u})^T)+\frac{1}{2}\left(Q(\nabla \textbf{u} - (\nabla \textbf{u})^T)-(\nabla \textbf{u} - (\nabla \textbf{u})^T)Q \right)+\frac{\kappa}{\Gamma}\Delta Q - Q\left(\frac{a}{\Gamma}+\frac{c}{\Gamma}|Q|^2 \right) I think the approach that I am going to take, is to Compute N-S without the stress tensor, use that data to compute the Q-tensor, use that to compute the stress tensor and then go back and forth between solving the two models.

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.