Example: quiz answers

LiveLink for MATLAB User’s Guide - COMSOL Multiphysics

LiveLink for MATLAB . user 's Guide LiveLink for MATLAB user 's Guide 2009 2018 COMSOL . Protected by patents listed on , and Patents 7,519,518; 7,596,474;. 7,623,991; 8,457,932; 8,954,302; 9,098,106; 9,146,652; 9,323,503; 9,372,673; and 9,454,625. Patents pending. This Documentation and the Programs described herein are furnished under the COMSOL Software License Agreement ( ) and may be used or copied only under the terms of the license agreement. COMSOL , the COMSOL logo, COMSOL Multiphysics , COMSOL Desktop, COMSOL Server, and LiveLink are either registered trademarks or trademarks of COMSOL AB. MATLAB is a registered trademark of The MathWorks, All other trademarks are the property of their respective owners, and COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by those or the above non- COMSOL trademark owners.

12 | CHAPTER 1: INTRODUCTION About this Product LiveLink™ for MATLAB® connects COMSOL Multiphysics to the MATLAB scripting environment. Using this functionality you can do the following: Set Up Models from a Script LiveLink™ for MATLAB® includes the COMSOL API, which has all the necessary functions and methods to implement models from ...

Tags:

  Guide, User, Introduction, Matlab, Livelink, Livelink for matlab user s guide

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of LiveLink for MATLAB User’s Guide - COMSOL Multiphysics

1 LiveLink for MATLAB . user 's Guide LiveLink for MATLAB user 's Guide 2009 2018 COMSOL . Protected by patents listed on , and Patents 7,519,518; 7,596,474;. 7,623,991; 8,457,932; 8,954,302; 9,098,106; 9,146,652; 9,323,503; 9,372,673; and 9,454,625. Patents pending. This Documentation and the Programs described herein are furnished under the COMSOL Software License Agreement ( ) and may be used or copied only under the terms of the license agreement. COMSOL , the COMSOL logo, COMSOL Multiphysics , COMSOL Desktop, COMSOL Server, and LiveLink are either registered trademarks or trademarks of COMSOL AB. MATLAB is a registered trademark of The MathWorks, All other trademarks are the property of their respective owners, and COMSOL AB and its subsidiaries and products are not affiliated with, endorsed by, sponsored by, or supported by those or the above non- COMSOL trademark owners.

2 For a list of such trademark owners, see Version: COMSOL Contact Information Visit the Contact COMSOL page at to submit general inquiries, contact Technical Support, or search for an address and phone number. You can also visit the Worldwide Sales Offices page at for address and contact information. If you need to contact Support, an online request form is located at the COMSOL Access page at Other useful links include: Support Center: Product Download: Product Updates: COMSOL Blog: Discussion Forum: Events: COMSOL Video Gallery: Support Knowledge Base: Part number: CM020008. C o n t e n t s Chapter 1: introduction About this Product 12. Help and Documentation 14. Getting Help.

3 14. Where Do I Access the Documentation and the Application Libraries? .. 18. Chapter 2: Getting Started The Client-Server Architecture 24. Running COMSOL Models at the Command Line 26.. Starting COMSOL with MATLAB on Windows / Mac OSX /.. 26. Linux . Connecting a COMSOL server and MATLAB Manually.. 28. Connecting to COMSOL Server .. 30.. Changing the MATLAB Version .. 32. The COMSOL Apps 34. Installing Apps in the MATLAB Apps Ribbon .. 34. Removing Apps in the MATLAB Apps .. 35. The COMSOL Apps .. 35. Calling External Function within the Model 36. Chapter 3: Building Models The Model Object 38. Important Notes About the Model Object .. 38. CONTENTS |3. The Model Object Methods.

4 39. The General Utility Functionality .. 39. The Model History .. 40. Loading and Saving a Model .. 41. Sharing the Model Between the COMSOL Desktop and the MATLAB Prompt .. 45. Working with Geometries 49. The Geometry Sequence Syntax .. 49. Displaying the Geometry .. 50. Working with Geometry Sequences .. 51. Retrieving Geometry Information .. 60. Modeling with a Parameterized Geometry .. 62. Images and Interpolation Data .. 66. Working with Meshes 74. The Meshing Sequence Syntax .. 74. Displaying the Mesh .. 75. Mesh Creation Functions .. 76. Importing External Meshes and Mesh Objects .. 101. Measuring Mesh Quality .. 103. Getting Mesh Statistics Information .. 104. Getting and Setting Mesh Data.

5 107. Modeling Physics 112. The Physics Interface Syntax .. 112. The Material Syntax .. 115. Modifying the Equations .. 116. Adding Global Equations .. 118. Defining Model Settings Using External Data File .. 120. Access the user -Defined Physics Interface .. 121. Creating Selections 122. The Selection Node.. 122. Coordinate-Based Selections .. 123. Selection Using Adjacent Geometry.. 127. Displaying Selections .. 128. 4 | CONTENTS. Computing the Solution 131. The Study Node .. 131. The Solver Sequence Syntax .. 132. Run the Solver Sequence .. 133. Adding a Parametric Sweep .. 134. Adding a Job Sequence.. 134. Plot While Solving .. 135. Analyzing the Results 137. The Plot Group Syntax.

6 137. Displaying The Results .. 138. The Data Set Syntax .. 143. The Numerical Node Syntax .. 144. Exporting Data .. 145. Chapter 4: Working With Models Using Workspace Variables in Model Settings 150. The Set and SetIndex Methods .. 150.. Using a MATLAB Function to Define Model Properties .. 151. Extracting Results 153. Extracting Data at Arbitrary Points .. 153. Evaluating a Minimum of Expression.. 157. Evaluating a Maximum of Expression .. 160. Evaluating an Integral .. 162. Evaluating an Expression Average .. 164. Extracting Data at Node Points .. 167. Evaluating an Expression at Geometry Vertices .. 170. Evaluating Expressions on Particle/Ray Trajectories .. 173. Evaluating a Global Expression.

7 174. Evaluating a Matrix Expression at Points .. 176. Evaluating a Global Matrix .. 178. Extracting Data From Tables .. 180. CONTENTS |5. Running Models in a Loop 181. The Parametric Sweep Node .. 181. Running Model in a Loop Using the MATLAB Tools .. 181. Running Models in Batch Mode 184. The Batch Node .. 184. Running an M-file in Batch Mode .. 184. Running an M-file in Batch Mode Without Display .. 185. Working with Matrices 186. Extracting System Matrices .. 186. Set System Matrices in the Model .. 192. Extracting State-Space Matrices .. 198. Extracting Reduced Order State-Space Matrices .. 203. Extracting Solution Information and Solution Vectors 210. Obtaining Solution Information.

8 210. Retrieving Solution Information and Solution Data Sets Based on Parameter Values .. 212. Extracting Solution Vector .. 215. Retrieving Xmesh Information 218. The Extended Mesh (Xmesh) .. 218. Extracting Xmesh Information .. 218. Navigating the Model 221. Navigating the Model Object Using a GUI .. 221. Navigating The Model Object At The Command Line .. 226. Finding Model Expressions .. 227. Evaluating the Model Parameters .. 228. Getting Feature Model Properties .. 229. Getting Parameter and Variable Definitions .. 230. Getting Selection Information .. 230. Handling Errors and Warnings 231. Errors and Warnings .. 231.. Using MATLAB Tools to Handle COMSOL Exceptions .. 231.

9 Displaying Warnings and Errors in the Model .. 231. 6 | CONTENTS. Improving Performance for Large Models 233. Allocating Memory .. 233. Disabling Model Feature Update .. 234. Disabling The Model History .. 235. Creating a Custom GUI 236. Chapter 5: Calling External Functions Running External Function 238. Allowing External MATLAB functions .. 238.. Disabling MATLAB Splash Screen at Start-up .. 238.. Running a MATLAB Function in Applications .. 239. The MATLAB Function Feature Node 240.. Defining a MATLAB Function in the COMSOL Model .. 240.. 245. Setting the Function Directory Path in MATLAB .. Adding a MATLAB Function with the COMSOL API Syntax .. 246. Function Input/Output Considerations.

10 246. Updating Functions .. 247. Defining Function Derivatives .. 247. Chapter 6: Command Reference Summary of Commands 250. Commands Grouped by Function 251. colortable .. 254. mphapplicationlibraries .. 255. mphcd .. 256. mphdoc .. 257. mpheval .. 257. mphevalglobalmatrix .. 261. mphevalpoint .. 263. mphevalpointmatrix .. 266. CONTENTS |7. mphevaluate .. 267. mphgeom.. 268. mphgetadj .. 270. mphgetcoords .. 271. mphgetexpressions .. 272. mphgetproperties .. 272. mphgetselection .. 273. mphgetu .. 273. mphglobal .. 275. mphimage2geom .. 278. mphinputmatrix .. 279. mphint2 .. 282. mphinterp .. 284. mphinterpolationfile.. 289. mphlaunch .. 290. mphload .. 291. mphmatrix .. 293.


Related search queries