Exemplo n.º 1
0
from domain.LoadPattern import LoadPattern
from domain.NodalLoad import NodalLoad
from domain.Node import Node
from domain.SP_Constraint import SP_Constraint
from domain.timeSeries.LinearSeries import LinearSeries
from element.FourNodeQuad import FourNodeQuad

# 使用3维的材料降维
from material.nD.PlaneStressMaterial import PlaneStressMaterial
from material.nD.elasticIsotropic.ElasticIsotropicThreeDimensional import ElasticIsotropicThreeDimensional

from analysis.system_of_eqn.FullGenLinSolver import FullGenLinSolver
from analysis.system_of_eqn.FullGenLinSOE import FullGenLinSOE
import numpy as np

theDomain = Domain()

node1 = Node(1, 2, -2.5, 0.0)
node2 = Node(2, 2, 2.5, 0.0)
node3 = Node(3, 2, 2.5, 1.0)
node4 = Node(4, 2, -2.5, 1.0)

theDomain.add_node(node1)
theDomain.add_node(node2)
theDomain.add_node(node3)
theDomain.add_node(node4)

theMaterial1 = ElasticIsotropicThreeDimensional(1, 200000.0, 0.3)
material = PlaneStressMaterial(2, theMaterial1)

quad1 = FourNodeQuad(1, 1, 2, 3, 4, material, 'PlaneStress', 1.0)
Exemplo n.º 2
0
def MomentCurvature(s1, axialLoad, maxK, numIncr=100):
    theDomain = Domain()
    # define two nodes at (0,0)
    node1 = Node(1, 3, 0.0, 0.0)
    node2 = Node(2, 3, 0.0, 0.0)

    # Fix all degrees of freedom except axial and bending
    sp1 = SP_Constraint(1, 1, 0.0, True)
    sp2 = SP_Constraint(1, 2, 0.0, True)
    sp3 = SP_Constraint(1, 3, 0.0, True)
    sp4 = SP_Constraint(2, 2, 0.0, True)

    # define element
    zerolengthsection1 = ZeroLengthSection(1, 2, 1, 2, s1)
    theDomain.add_element(zerolengthsection1)

    # Define constant axial load
    theSeries1 = ConstantSeries(1)
    theLoadPattern1 = LoadPattern(1)
    theLoadPattern1.set_time_series(theSeries1)
    theDomain.add_load_pattern(theLoadPattern1)
    theLoadValues = np.array([axialLoad, 0.0, 0.0])
    theLoad1 = NodalLoad(1, 2, theLoadValues)
    theDomain.add_nodal_load(theLoad1, 1)

    # define analysis parameters
    theModel = AnalysisModel()
    theSolnAlgo = NewtonRaphson()
    theIntegrator = LoadControl(0.0, 1, 0.0, 0.0)
    theHandler = PlainHandler()
    theNumberer = PlainNumberer()
    theSolver = FullGenLinSolver()
    theSOE = FullGenLinSOE(theSolver)

    theAnalysis = StaticAnalysis(theDomain, theHandler, theNumberer, theModel,
                                 theSolnAlgo, theSOE, theIntegrator)
    # Do one analysis for constant axial load
    numSteps = 1
    theAnalysis.analyze(numSteps)

    # Define reference moment
    theSeries2 = LinearSeries(2)
    theLoadPattern2 = LoadPattern(2)
    theLoadPattern2.set_time_series(theSeries2)
    theDomain.add_load_pattern(theLoadPattern2)
    theLoadValues = np.array([0.0, 0.0, 1.0])
    theLoad2 = NodalLoad(2, 2, theLoadValues)
    theDomain.add_nodal_load(theLoad2, 2)

    # Compute curvature increment
    dK = maxK / numIncr
    theIntegrator2 = DisplacementControl(2, 3, dK, theDomain, 1, dK, dK)
    theAnalysis2 = StaticAnalysis(theDomain, theHandler, theNumberer, theModel,
                                  theSolnAlgo, theSOE, theIntegrator2)
    theAnalysis2.analyze(numIncr)
Exemplo n.º 3
0
from data.Data import Data
from domain.Domain import Domain
import numpy as np
from hybrid_model.TimeSeriesPair import TimeSeriesPair
from scipy.optimize import minimize
from reference_model.Lactose_kinetic_fitting.CrystallizationModel import CrystallizationModel
from reference_model.Lactose_kinetic_fitting.CrystallizationKinetics import CrystallizationKinetics, LactoseSolute, LactoseGrowth, LactoseNucleation
import seaborn as sns
sns.set()
import matplotlib.pyplot as plt
from Timer import Timer
import lmfit

# Construct discretized domain object for hybrid model
domain = Domain(name='Domain')
domain.add_axis(x_min=5,
                x_max=100,
                m=30,
                disc_by='FeretMean',
                name='FeretMean')

# Create data-set and set up data-shuffler
data = Data(case_id='Laboratory lactose case study')
data.load_from_pickle(
    'C:/Users/rfjoni/PycharmProjects/ParticleModel/projects/CACE_cases/CACE_lactose_study/lactose'
)
data.batches[2].batch_id = 'Batch 1'
data.batches[3].batch_id = 'Batch 2'

# Convert time and temperature data to polynomial fit
# Batch 1
Exemplo n.º 4
0
import numpy as np
from domain.NodalLoad import NodalLoad
from analysis.integrator.LoadControl import LoadControl
from analysis.algorithm.NewtonRaphson import NewtonRaphson
from analysis.model.AnalysisModel import AnalysisModel
from analysis.PlainHandler import PlainHandler
from analysis.PlainNumberer import PlainNumberer
from analysis.system_of_eqn.FullGenLinSOE import FullGenLinSOE
from analysis.system_of_eqn.FullGenLinSolver import FullGenLinSolver
from analysis.StaticAnalysis import StaticAnalysis
from domain.timeSeries.LinearSeries import LinearSeries
from analysis.integrator.DisplacementControl import DisplacementControl
from material.section.Fiber.UniaxialFiber3d import UniaxialFiber3d
from material.section.FiberSection3d import FiberSection3d

domain = Domain()

# core concrete (confined)
m1 = Concrete01(1, -6.0, -0.004, -5.0, -0.014)
# cover concrete (unconfined)
m2 = Concrete01(2, -5.0, -0.002, 0.0, -0.006)
# steel
m3 = Steel01(3, 60.0, 30000.0, 0.01)

colWidth = 15
colDepth = 24
cover = 1.5
As = 0.60  # area of no.7 bars
y1 = colDepth / 2.0
z1 = colWidth / 2.0