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.

Equation from models

Please login with a confirmed email address before reporting spam

Hi everyone, I'm working with a problem in which several physics are used, So, i'm wondering how could be possible get the equation from a model once it has been run and solved, for instance if i have a laminar flow section and i want to run it firstly, then how can i get the equation of fiel velocity like "u", that i can put in other section where velocity field is required?

Thanks for your attention

Regards

Vincenzo


6 Replies Last Post Oct 19, 2021, 7:43 a.m. EDT
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Oct 15, 2021, 9:38 a.m. EDT
Updated: 3 years ago Oct 15, 2021, 10:43 a.m. EDT

Hello Vincenzo,

Simply call the variable by its name in a mathematical expression. There's nothing to it.

Jeff

-------------------
Jeff Hiller
Hello Vincenzo, Simply call the variable by its name in a mathematical expression. There's nothing to it. Jeff

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Oct 16, 2021, 1:12 p.m. EDT

Thanks for reply, i don't get where i can find mathematical expression, is it a module?

Vincenzo

Thanks for reply, i don't get where i can find mathematical expression, is it a module? Vincenzo

Acculution ApS Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Oct 18, 2021, 5:04 a.m. EDT

A lot of variables exist within COMSOL, so if you have solved for a velocity, and it is called 'u' then you can write something as a function of u as 'somefunction(5u)' or whatever. You might have to call it more specifically as 'comp1.u' but try it out with some simple examples.

-------------------
René Christensen, PhD
Acculution ApS
www.acculution.com
info@acculution.com
A lot of variables exist within COMSOL, so if you have solved for a velocity, and it is called 'u' then you can write something as a function of u as 'somefunction(5u)' or whatever. You might have to call it more specifically as 'comp1.u' but try it out with some simple examples.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Oct 18, 2021, 12:15 p.m. EDT

There are two approaches I use to avoid hunting through the documentation:

  1. Look at the list of quantities available for plotting or evaluation.
  2. Print a report (I usually use intermediate). Absurdly long but contains an exhaustive list of principal and derived quantities.
There are two approaches I use to avoid hunting through the documentation: 1. Look at the list of quantities available for plotting or evaluation. 2. Print a report (I usually use intermediate). Absurdly long but contains an exhaustive list of principal and derived quantities.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Oct 19, 2021, 6:52 a.m. EDT

Thanks so much to everyone, i probably didn't explain properly what i meant, i want extrapolate the velocity field "u" as an equation in term of x,y,z,t [for example in stationary state: u=0.2(1-(y/0.0025)^2)(1-(z/0.0025)^2)]. That's will help to reduce the time required for the compilation in an another model (bigger) in which i don't wanna put the laminar flow module.

There are two approaches I use to avoid hunting through the documentation:

  1. Look at the list of quantities available for plotting or evaluation.
  2. Print a report (I usually use intermediate). Absurdly long but contains an exhaustive list of principal and derived quantities.

This kind of approach look nice, i should just figure out , thanks so much Regards, Vincenzo

Thanks so much to everyone, i probably didn't explain properly what i meant, i want extrapolate the velocity field "u" as an equation in term of x,y,z,t [for example in stationary state: u=0.2*(1-(y/0.0025)^2)*(1-(z/0.0025)^2)]. That's will help to reduce the time required for the compilation in an another model (bigger) in which i don't wanna put the laminar flow module. >There are two approaches I use to avoid hunting through the documentation: > >1. Look at the list of quantities available for plotting or evaluation. >2. Print a report (I usually use intermediate). Absurdly long but contains an exhaustive list of principal and derived quantities. This kind of approach look nice, i should just figure out , thanks so much Regards, Vincenzo

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 years ago Oct 19, 2021, 7:43 a.m. EDT

Hi Vincenzo,

To define an analytical expression for the velocity in terms of x, y, z, and t (in 3D), you can simply use x, y, z, and t, which are predefined independent variables in a 3D Cartesian COMSOL Multiphysics model, along with any scalar numbers and mathematical operators and functions that are available in COMSOL Multiphysics. You could use the expression that you used as an example above in one of the velociy field's components as

0.2[m/s]*(1-(y[1/m]/0.0025)^2)*(1-(z[1/m]/0.0025)^2)

What I have changed is that you must use explicit multiplication symbols (*), and I also made the expression return a velocity in m/s using the unit syntax in COMSOL Multiphysics.

Best regards,

Magnus

Hi Vincenzo, To define an analytical expression for the velocity in terms of x, y, z, and t (in 3D), you can simply use `x`, `y`, `z`, and `t`, which are predefined independent variables in a 3D Cartesian COMSOL Multiphysics model, along with any scalar numbers and mathematical operators and functions that are available in COMSOL Multiphysics. You could use the expression that you used as an example above in one of the velociy field's components as `0.2[m/s]*(1-(y[1/m]/0.0025)^2)*(1-(z[1/m]/0.0025)^2)` What I have changed is that you must use explicit multiplication symbols (`*`), and I also made the expression return a velocity in m/s using the unit syntax in COMSOL Multiphysics. Best regards, Magnus

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.