wbound
(Not recommended) Write boundary condition file
wbound
is not recommended. Use applyBoundaryCondition
instead.
Syntax
Description
Examples
Create Boundary Condition File
Create a 2-D geometry and specify boundary conditions in the PDE Modeler app, export them to the MATLAB® workspace, and then write the boundary conditions to a file.
Start the PDE Modeler app and draw a unit circle and a unit square.
pdecirc(0,0,1) pderect([0 1 0 1])
Enter C1-SQ1
in the Set formula
field.
Use the default Dirichlet boundary condition u = 0 for all
boundaries. To verify the boundary condition, switch to boundary mode by selecting Boundary > Boundary Mode. Use Edit > Select all to select all boundaries. Select Boundary > Specify Boundary Conditions and verify that the boundary condition is the Dirichlet condition with
h = 1
, r = 0
.
Export the geometry and the boundary conditions to the MATLAB workspace by selecting the Export Decomposed Geometry, Boundary Cond's option from the Boundary menu.
Decompose the exported geometry into minimal regions. The result is one minimal region with five edge segments: three circle edge segments and two line edge segments.
Write the resulting boundary condition matrix to a file. Name the file
boundary.m
.
fid = wbound(b,"boundary");
Input Arguments
b
— Boundary conditions
boundary matrix
Boundary conditions, specified as a boundary matrix. Typically, you export a boundary matrix from the PDE Modeler app.
Data Types: double
filename
— Geometry file name
string | character vector
Geometry file name, specified as a string or a character vector.
Data Types: char
| string
Output Arguments
fid
— File identifier
integer | -1
File identifier, returned as an integer. If wbound
cannot write
the file, fid
is -1
. For more information about
file identifiers, see fopen
.
Version History
Introduced before R2006aR2016a: Not recommended
wbound
is not recommended. Use applyBoundaryCondition
instead. There are no plans to remove
wbound
.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)