Support Knowledge Base

Solution Number: 1007
Title: Solving Algebraic and Transcendental Equations
Platform: All Platforms
Applies to: COMSOL Multiphysics
Versions: 3.4
Created: April 3, 2007
Last Modified: February 11, 2008
Categories: PDEs, ODEs, and other equations
Keywords:

Problem Description

How can I solve algebraic equations and transcendental equations in COMSOL?

Solution

The Global Equation interface can handle more than ODEs. By skipping the time derivative, you can formulate algebraic and transcendental equations. These can be useful to solve coupled to a larger FEA problem (for example a control law), or as is, as is demonstrated below.


Solving Algebraic Equations

Consider the equation f(u)=0, where f(u)=u3+u-2. This equation has a single root at u = 1. To solve the equation in COMSOL, proceed as follows:

  1. Draw an arbitrary geometry if you have not already done so.
  2. From the Physics menu, open the Global Equations dialog box.
  3. Type u in the Name (u) column and u^3+u-2 in the Equation column (both entries in the same row). Click OK.
  4. Click the Solve button on the Main toolbar to compute the solution.
  5. To display the solution in the message log, choose Postprocessing > Data Display > Global. Find u in the Predefined quantities drop-down list. 
  6. Click Apply. The value will now appear in the message log at the bottom of the COMSOL graphical user interface.


Solving Transcendental Equations

As an example of a transcendental equation, consider f(u)=0 with f(u)=e-u–u. A root to this equation is approximately at u=0.567. To obtain this solution, follow the steps above, but enter exp(-u)-u in the Equation column instead and repeat steps 4-6 above.

More information
See also: Solution 1019 for solution of nonlinear equation systems and ODEs at the COMSOL Script command line.

You can find more information about adding ODEs in the following chapter in the COMSOL Mutiphysics 3.4 Modeling Guide: Global Equations and ODEs.

Feedback

Poor | Excellent
Document quality?




« Back to Support Knowledge Base

Disclaimer

COMSOL makes every reasonable effort to verify the information you view on this page. Resources and documents are provided for your information only, and COMSOL makes no explicit or implied claims to their validity. COMSOL does not assume any legal liability for the accuracy of the data disclosed. Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark details.

© 1997-2008 COMSOL AB.
COMSOL, COMSOL Multiphysics, COMSOL Reaction Engineering Lab, COMSOL Script and
FEMLAB are registered trademarks of COMSOL AB. Other product or brand names are
trademarks or registered trademarks of their respective holders. All Rights Reserved.