Professional Documents
Culture Documents
Comsol Cookbook
Comsol Cookbook
Cookbook for
Multiphysics
Modeling
Page 1
Table of Contents
1 Selecting Application Modes........................................................................................................... 3
1.1 Heat Transfer, 2D..................................................................................................................... 3
1.2 Heat Transfer, 3D..................................................................................................................... 3
1.3 Standard Package, Application modes......................................................................................3
1.4 Heat Transfer Module, Application modes...............................................................................4
2 Geometry Modeling and CAD Tools............................................................................................... 5
2.1 Importing CAD Drawing.......................................................................................................... 5
2.2 CAD Import Options................................................................................................................ 5
2.3 Exporting Geometry (DXF)......................................................................................................5
2.4 Adding Geometric Objects....................................................................................................... 5
2.5 Modifying Objects.................................................................................................................... 6
2.6 Object Composition.................................................................................................................. 6
2.7 Specifying Grid and Axes.........................................................................................................6
2.8 Using Work Planes................................................................................................................... 6
2.9 Using Assemblies..................................................................................................................... 6
2.10 Visualization Tools................................................................................................................. 7
3 Modeling Physics and Equations......................................................................................................7
3.1 Entering Material Properties.....................................................................................................7
3.2 Specifying Boundary Conditions..............................................................................................8
3.3 Specifying Application Mode Properties..................................................................................9
4 Meshing.......................................................................................................................................... 10
4.1 Triangular (free) meshing....................................................................................................... 10
4.2 Quadrilateral (brick, mapped) meshing................................................................................. 10
4.3 Other Meshing options............................................................................................................10
5 Solving the Model.......................................................................................................................... 11
5.1 Solver settings.........................................................................................................................11
5.1.1 Stationary solver settings................................................................................................ 11
5.1.2 Time-dependent solver settings...................................................................................... 12
5.1.3 Parametric solver settings............................................................................................... 13
5.2 Solver Manager.......................................................................................................................13
5.3 Quick and Easy Solutions....................................................................................................... 14
6 Postprocessing and Visualization................................................................................................... 15
6.1 Plot Parameters....................................................................................................................... 15
6.2 Creating Animations............................................................................................................... 17
7 Documentation and Model Management....................................................................................... 18
7.1 Creating HTML Summary......................................................................................................18
7.2 Adding Model Description..................................................................................................... 18
7.3 Adding Model Image.............................................................................................................. 18
7.4 Maintaining User Model Library............................................................................................18
Page 2
If you have Heat Transfer Module, use it's application modes, otherwise use standard package's
modes. Application modes from Heat Transfer Module have more features than the ones from the
standard package.
1.1
Heat Transfer, 2D
1.2
Heat Transfer, 3D
1.3
heat flux, (convective flux for convection), temperature, insulation, and continuity
Page 3
Standard package's Heat Transfer application modes can also model simple radiation term (see heat
flux boundary condition's equation).
Comsol Multiphysics->Fluid Dynamics->Incompressible Navier-Stokes
1.4
Convection and conduction terms can be switched on and off in subdomain settings.
More options in boundary conditions including: radiation type and highly conductive layers
Turbulent flow
Ready made multiphysics application modes for combined flow and heat problems
Page 4
2.1
2.2
You can import both solid and curve objects and choose how to try convert edges to solids.
Repair tolerance is relative to the dimensions of the CAD drawing (1e-2 == 1%, 1e-3 == 0.1%, 1e-4
= 0.01%).
2.3
For exporting 2D geometry objects to a DXF file, select Export>Geometry To File in the File menu.
Then, choose DXF file in the Files of type list and click Save.
In 3D only Comsol Multiphysics formats (*.mphtxt, *.mphbin) are supported.
2.4
Page 5
In addition you can use 2D work planes and embed, extrude or revolve 2D objects into 3D
2.5
Modifying Objects
To modify object
Draw>Object properties
To copy object
Mirror - copy and flip the selected object(s) around the reflection line
2D tools only
2.6
Object Composition
Split object
2.7
2.8
2.9
Using Assemblies
Draw>Use Assembly
Draw>Create Pairs
Page 6
2.10
Visualization Tools
Options>Visualization/Selection Settings
Options>View Geometries
Options>Suppress
Options>Labels
3.1
Subdomains
Groups
Select by group
Library material
Page 7
Init
3.2
Page 8
3.3
Application Mode specific properties are found from Physics>Properties and unit dependent scalar
variables from Physics>Scalar Variables.
Page 9
4 Meshing
4.1
4.2
4.3
The On-line Users Guide illustrates the use of meshing tools with several examples.
Page 10
Solver settings
If you have selected the right analysis type from the Model Navigator, you can just press the Solve
button. To change the analysis type and the solver settings select Solve>Solver Parameters.
5.1.1
Analysis
Sets up equations in the application mode (see also Physics>Properties)
Auto select solver
Solver
Try first the default settings, they have been automatically selected according your
application mode selections
If you know good settings for your problem, use those
Otherwise see Users Guide>Linear System Solver Selection Guidelines
Page 11
5.1.2
General page
Times
Syntax: start:step:stop
the default example 0:0.1:1, from 0 to 1 sec with step of 0.1
Page 12
5.1.3
Give the name of parameter and list of parameter values and you are done.
5.2
Solver Manager
By changing Initial values and Solve For Variables you can iteratively and sequentially find a
solution for complex problems.
Initial value
These values affect on the variables you are solving for now
Sakari's Quick Cookbook for Multiphysics Modeling
Page 13
Initial value expression evaluate the expression in init page (Subdomain and boundary
settings)
Current solution continue from the values you have solved so far
Stored solution used together with the Store Solution button, you can store one previous
solution, which is different from current solution
If you are solving your model sequentially, used combination with Solve for Variables page
Use settings from Initial value frame use same setting as for initial value
5.3
Time-dependent problem
Page 14
Plot Parameters
Predefined quantities
Lists predefined quantities
Expression
Enter custom expression
Example: sqrt(T)+3
Unit
For predefined expressions you can select unit from the list
Color scale
Adds a scale to right of the postprocessing graphics
Page 15
General settings
Plot type
Check those plots you want to display simultaneously
Solution to use
For time-dependent and parametric models you can select the solution (time or parameter
value)
Element selection
In 3D cases can be used for select part of the geometry
Example: x > 0.05 (select the elements having x-coordinate greater than 0.05)
Plot in
Either to main GUI or separate figures
Page 16
6.2
Creating Animations
You can create animations for time-dependent and parameteric studies by selecting Animate page
from Postprocessing>Plot Parameters.
Solutions to use
Select the solutions to animation
Use camera settings from main window
Use the axis settings from GUI
Start Animation
Create the movie
Movie Settings
Select the movie type, resolution
Press Advanced button to change encoder and compression level.
Page 17
7.2
This with the the model image are shown in Model Navigator's User Models page.
7.3
7.4
Keep all your models in one structured folder, for example C:\models. Use that as the Library root
of User models. Create subfolders for each new project and keep all project related model in same
folder. Use numbering for versions and remember enter Model Description and update the model
image before saving new version.
Page 18