Example c1: Solving for potential in spheres

No description


The comfile run by this example is as follows:

#Example_c1  Solving for potential in spheres

             #This example tests the analytic solution to an eccentric
             #dipole inside a single sphere with the solution computed
             #by CMISS.  Note that the potential can be solved for up 
             #to an arbitrary additive constant, so matching needs to 
             #be performed if the analytic and computational solutions
             #are to be the same.  This is why 'define analytic' is 
             #done after the solve.

fem                            #Sets the environment to FEM.
fem define coordinates;r;eccentric_dipole;example #defines 3D rectangular.
fem define bases;r;;example        #Define 3 bicubic Hermite BEM basis.
fem define mesh;r;;example         #Generate a sphere of radius 2 with 4*4
#                              !  discretisation.
fem group node 1 as top        #Name the nodes for use with the initial
fem group node 2..13 as middle #  conditions.
fem group node 14 as bottom    #
fem define equation;r;;example     #Standard Laplace equation.
fem define material;r;;example     #No material definitions.
fem define source;r;;example       #Define an arbitrary dipole position,
#                              !  orientation and strength.
fem define initial;r;;example      #Fix the potential at the top of the
#                              !  sphere to 0.0.
fem define solve;r;;example        #Define solution parameters.
fem solve                      #Calculate the potential on the sphere.
fem define analytic;r;;example     #Define the analytic solution based on
#                              !  the calculated potential - ie the
#                              !  average potential of the analytic and
#                              !  computational solutions are the same.
fem check solution             #Compare analytic and computational
#                              !  solutions.

Additional testing commands:

fem check solution 

Files used by this example are:

Name                     Modified     Size

example_c1.com 10-Apr-2000 1.9k eccentric_dipole.ipanal 10-Apr-2000 735 eccentric_dipole.ipbase 10-Apr-2000 4.5k eccentric_dipole.ipcoor 10-Apr-2000 570 eccentric_dipole.ipequa 26-May-2003 1.1k eccentric_dipole.ipinit 10-Apr-2000 718 eccentric_dipole.ipmate 10-Apr-2000 54 eccentric_dipole.ipmesh 10-Apr-2000 1.0k eccentric_dipole.ipsolv 13-Apr-2007 1.3k eccentric_dipole.ipsour 10-Apr-2000 295 test_output.com 10-Apr-2000 20

Download the entire example:

Name                  Modified     Size

examples_c_c1.tar.gz 14-Apr-2007 6.5k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:02:29 20160
cm-debugSuccessSat Mar 5 00:04:24 20160
mips-irix
cmSuccessSun Aug 19 01:26:28 20073
cm-debugSuccessWed Aug 15 01:26:50 20079
cm-debug-clear-mallocSuccessSat Aug 18 01:31:27 200713
cm-debug-clear-malloc7SuccessMon Aug 20 01:28:24 200713
cm64SuccessSun Aug 19 01:29:31 20074
cm64-debugSuccessTue Aug 21 01:24:38 200710
cm64-debug-clear-mallocSuccessThu Apr 1 11:27:14 20048
rs6000-aix
cmSuccessWed Mar 4 01:07:50 20090
cm-debugSuccessMon Mar 2 01:07:21 20092
cm64SuccessWed Mar 4 01:07:50 20090
cm64-debugSuccessTue Mar 3 01:12:18 20092
x86_64-linux
cmSuccessSun Mar 6 00:01:06 20161
cm-debugSuccessSat Mar 5 00:01:37 20161

Testing status by file:


Html last generated: Sun Mar 6 05:51:17 2016

Input last modified: Fri Apr 13 10:40:35 2007


CMISS Help / Examples / c / c1