Example 31c: Steady state Laplace equation with bicubic hermite elements and some collapsed nodes

Demonstrates how to set up a 2D steady state Laplace's equation problem with bicubic hermite elements and some collapsed nodes.

Things to pay attention to are the mappings and setting or leaving free the boundary node derivatives.

The cmgui script 'view.com' also demonstrates how to view the solution using a spectrum and contours.

The comfile run by this example is as follows:

# Example 31c roughly based on example 3151

set dir example 31c

$name = "example_31c";

fem define parameters;r;$name;example

fem define coordinates;r;$name;example

fem define nodes;r;$name;example
fem define bases;r;$name;example
fem define elements;r;$name;example

# Use the 'versions individual' option to prevent it calculating the
# average for all versions. Remove it and then view the mesh using
# 'cmgui view.com' to see what happens without it.

fem update node deriv 1 versions individual
fem update node deriv 2 versions individual

fem export nodes;$name;example as $name offset 0;
fem export element;$name;example as $name offset_node 0 offset_elem 0;

# draw the mesh in the GX window
fem define wind;c
fem draw lines
fem draw nodes

fem define equation;r;$name;example

# Mappings must be defined after equation but before solve
fem def mapping;r;$name;example

fem define material;r;$name;example

# Set up node groups for boundary conditions so that we can refine and
# not have to tediously specify individual nodes

fem group element all external s2=0 as BOTTOM;
fem group nodes xi2=0 element BOTTOM as BOTTOMNODES;

fem group element all external s3=1 as TOP;
fem group nodes xi2=1 element TOP as TOPNODES;

fem define initial;r;$name;example     #Defines initial conditions

fem define solve;r;$name;example

fem solve

# update the GX window
fem draw field
fem draw contours label off
fem draw lines

fem export node;laplace_solution as laplace_solution field
fem export elem;laplace_solution as laplace_solution field

#system "cmgui view"
fem quit

Files used by this example are:

Name                     Modified     Size

example_31c.com 17-Jul-2007 1.5k example_31c.exelem 17-Jul-2007 15k example_31c.exnode 17-Jul-2007 7.0k example_31c.ipbase 17-Jul-2007 1.5k example_31c.ipcoor 17-Jul-2007 983 example_31c.ipelem 17-Jul-2007 5.9k example_31c.ipequa 17-Jul-2007 1.3k example_31c.ipinit 17-Jul-2007 874 example_31c.ipmap 17-Jul-2007 2.3k example_31c.ipmate 17-Jul-2007 54 example_31c.ipnode 17-Jul-2007 6.7k example_31c.ippara 17-Jul-2007 5.9k example_31c.ipsolv 17-Jul-2007 1.1k laplace_solution.exelem 17-Jul-2007 13k laplace_solution.exnode 17-Jul-2007 3.9k view.com 17-Jul-2007 1.7k

Download the entire example:

Name                      Modified     Size

examples_3_31_31c.tar.gz 18-Jul-2007 10k

Html last generated: Sun Mar 6 05:50:16 2016

Input last modified: Tue Jul 17 12:13:05 2007

CMISS Help / Examples / 3 / 31 / 31c