Beispiel #1
0
    # Velocity vy
    yvelocity_RHS = -sps.lil_matrix.dot(Gx, psi)
    yvelocity_RHS = np.multiply(yvelocity_RHS, condition_yvelocity.bc_2)
    yvelocity_RHS = yvelocity_RHS + condition_yvelocity.bc_dirichlet
    vy = scipy.sparse.linalg.cg(condition_yvelocity.LHS,
                                yvelocity_RHS,
                                vy,
                                maxiter=1.0e+05,
                                tol=1.0e-05)
    vy = vy[0].reshape((len(vy[0]), 1))
    #----------------------------------------------------------------------------------

end_time = time()
solution_time = end_time - start_time
print ' time duration: %.1f seconds' % solution_time
print ""

print ' ----------------'
print ' SAVING RELATORY:'
print ' ----------------'
print ""
print ' End simulation. Relatory saved in %s' % directory_save
print ""

# -------------------------------- Export Relatory ---------------------------------------
relatory.export(save.path, directory_save, sys.argv[0], benchmark_problem,
                scheme_name, mesh_name, equation_number, npoints, nelem,
                length_min, dt, nt, Re, Sc, import_mesh_time, assembly_time,
                bc_apply_time, solution_time, polynomial_order, gausspoints)
Beispiel #2
0
if end_type == 0:
 print ' END SIMULATION. NOT STEADY STATE'
 print ' Relatory saved in %s' %folderResults
 print ""

elif end_type == 1:
 print ' END SIMULATION. STEADY STATE'
 print ' Relatory saved in %s' %folderResults
 print ""

elif end_type == 2:
 print ' END SIMULATION. ERROR CONVERGENCE RESULT'
 print ' Relatory saved in %s' %folderResults
 print ""

elif end_type == 3:
 print ' END SIMULATION. FORCED INTERRUPTION'
 print ' Relatory saved in %s' %folderResults
 print ""




# -------------------------------- Export Relatory ---------------------------------------
relatory.export(save.path, folderResults, sys.argv[0], benchmark_problem, description_name, scheme_name, mshFileName, numNodes, numElements, minLengthMesh, dt, numIteration, Re, Sc, import_mesh_time, assembly_time, bc_apply_time, solution_time, polynomial_order, gausspoints, observation)
# ----------------------------------------------------------------------------------------