Difference between revisions of "Comsol import.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
m (Rename Arguments section heading to Parameters)
Line 6: Line 6:
 
     mesh=comsol_import(comsol)
 
     mesh=comsol_import(comsol)
  
−
==Arguments==
+
==Parameters==
  
 
     comsol.mesh_file - name of an ASCII file with vertex coordinates and edge index produced by COMSOL
 
     comsol.mesh_file - name of an ASCII file with vertex coordinates and edge index produced by COMSOL

Revision as of 18:47, 5 June 2026

COMSOL 2D mesh data import, cropping and preprocessing for Spinach.

Syntax

   mesh=comsol_import(comsol)

Parameters

   comsol.mesh_file - name of an ASCII file with vertex coordinates and edge index produced by COMSOL

   comsol.velo_file - name of an ASCII file with vertex-centred flow velocities produced by COMSOL

   comsol.crop      - {[xmin xmax],[ymin ymax]} region of the mesh to retain

   comsol.inactivate - a vector with mesh vertex indices to deactivate

Outputs

   mesh             – Spinach mesh object with

                     ▸ geometry (.x, .y, .idx)
                     ▸ flow velocities (.u, .v)
                     ▸ Voronoi tessellation (.vor)
                     ▸ fast-plot auxiliaries (.plot)

Notes

Internally this routine is a convenience wrapper that calls:

   ▸ comsol_mesh()      – mesh import
   ▸ comsol_velo()      – velocity import
   ▸ mesh_crop()        – region trimming
   ▸ mesh_vorn()        – Voronoi tessellation
   ▸ mesh_preplot()     – plotting accelerators

See also

Microfluidic mesh import and plotting

Version 2.11, authors: Ilya Kuprov