IES ConcreteBending User's Guide
Example: Refine Mesh
Refine Mesh
Copy Code
//Use a loop to refine the mesh of the ACI350 tank wall example project

SetUnits("Kips & Inches");
DeleteAll();

//open the ACI350 tank wall example before running the script

//Try finer and finer mesh until the extreme Mx moment stops changing
var meshSetting = 100; 
var delta = 100.0;  //initialize to a big value
var moment = -100.0; //initialize to a big value
int i = 0; //keep track of the number of iterations needed to find the converged value
var tolerance = 1.0;  //stop when the moment changes by less than 1 k-in/in
while(delta > tolerance)
{    
    i++;
    meshSetting *= 2;
    SetMeshCustom(meshSetting);
    await Analysis();
    //interested in the negative moment at the side support    
    var newMoment = MomentX(false); 
    delta = Math.Abs(moment - newMoment);
    moment = newMoment;
}

//Print out the final results
$"Mux = {moment:f1}; Final Delta = {delta:f2}; Trials = {i}"