Fem-fenics: Difference between revisions

67 bytes removed ,  6 September 2013
no edit summary
No edit summary
No edit summary
Line 261: Line 261:
<div style="clear:both"></div>
<div style="clear:both"></div>


=== Mixed Formulation for Poisson Equation ===
=== Hyperelasticity ===
This time we compare the code with the c++ version of DOLFIN.
This time we compare the code with the c++ version of DOLFIN.
{{Code|HyperElasticity Problem: the ufl file|<syntaxhighlight lang="octave" style="font-size:13px">  
{{Code|HyperElasticity Problem: the ufl file|<syntaxhighlight lang="octave" style="font-size:13px">  
Line 398: Line 398:


# Define source and boundary traction functions
# Define source and boundary traction functions
B = Expression ('B', @(x,y,z) [0.0; -0.5; 0.0]);
B = Constant ('B', [0.0; -0.5; 0.0]);
T = Expression ('T', @(x,y,z) [0.1; 0.0; 0.0]);
T = Constant ('T', [0.1; 0.0; 0.0]);




Line 407: Line 407:
E = 10.0;
E = 10.0;
nu = 0.3;
nu = 0.3;
mu = Expression ('mu', @(x,y,z) E./(2*(1+nu)));
mu = Constant ('mu', E./(2*(1+nu)));
lmbda = Expression ('lmbda', @(x,y,z) E*nu./((1+nu)*(1-2*nu)));
lmbda = Constant ('lmbda', E*nu./((1+nu)*(1-2*nu)));
u = Expression ('u', @(x,y,z) [0; 0; 0]);
u = Expression ('u', @(x,y,z) [0; 0; 0]);


60

edits