i am working with surface evolver string model, i am trying to create a model of two fixed vertices with an arc between them, the arc is at a fixed length energy constraint with symmetric edge distribution function. the model is starting as a 2D square with the bottom vertices and edge fixed, and evolving into a symmetric "hemisphere" shape. im trying to think of a energy constraint to force the contact angles at the lower vertices to reach and hold a certain value while letting the arc continue to find its optimal shape. i know the arc will get to a weird shape.... i tried to to approach from the dihedral attribute but its a read only, the concept is to set the angle by "variation from the angle will cost energy", i cant figure out a way to incorporate it in the code as a constraint....
STRING
SPACE_DIMENSION 2
PARAMETER Length0 = 3
PARAMETER Kappa = 15
PARAMETER Kappa2 = 100
PARAMETER angle = 15 // desired inner angle
PARAMETER radian = pi-((angle*pi)/180) // inner angle in radian
PARAMETER T = (-cos(angle*pi)/180) // inner angle in radian
PARAMETER radius = 0.5
quantity edge_sint energy method edge_scalar_integral global
scalar_integrand: ((total_length - Length0)^2) * Kappa
quantity sq energy method sqcurve_string global
//quantity point_value energy method vertex_scalar_integral
//scalar_integrand: ((vertex.dihedral - radian)^2) * Kappa2
//constraint 1
//formula: x3 = 0;
//energy: // for contact angle
//e1: edge_sint*y
//e2: 0
//e3: 0
vertices
1 0 0 fixed
2 0.25 1
3 0.75 1
4 1 0 fixed
edges
1 1 2
2 2 3
3 3 4
4 4 1 fixed
read
showq;
read "zebra.cmd";
r2 := { avg_len := 0;
num_edges := 0;
foreach edges ee where not fixed do {
avg_len := avg_len+ee.length; num_edges := num_edges+1;
};
avg_len := avg_len/num_edges;
refine edges where length > avg_len AND not fixed;
zebra}
set edge tension 0
zebra;
calc := { g; r2; g 5; r2; g10; r2; U; g5; r2; g100}