Batch
Hi,
I have began to work with batch mode. I run a script in batch mode, where I read the materials parameter (k1 and kp) from the table.
The code work in regular mode, but does gives following error message in batch mode:
#0 (k1=700,kp=10) FAILED (exit status 256), duration 00:00:01, log tablet_
Here is my table
k1 kp
700 7000
650 7800
600 12000
here is my code:
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 15 16:29:55 2021
@author: njb18198
"""
#!/usr/bin/env python
#encoding: ascii
# Testing of the Deformation Enginge with Luding Contact Law
# Modified Oedometric Test
# The reference paper [Haustein2017]
from __future__ import print_function
from yade import utils, plot, timing
from yade import pack
import pandas as pd
import numpy as np
from PIL import Image
from yade import pack, export
from scipy.interpolate import interp1d
from csv import writer
import os
readParamsFromT
from yade.params.table import *
o = Omega()
# Physical parameters
fr = 0.41
rho = 1561
Diameter = 7.9e-5
D=Diameter
r1 = Diameter/2
#r2 = Diameter/2
k1 = k1
kp = kp*k1
kc = k1 * 0.1
ks = k1 * 0.1
DeltaPMax = Diameter/3.0
Chi1 = 0.34
o.dt = 1.0e-7
particleMass = 4.0/3.0*
m_tot=4e-06
no_p=m_
Vi1 = math.sqrt(
PhiF1=0.999
#PhiF1 = DeltaPMax*
Tab_rad=0.001
Cyl_height=0.0092
cross_area=
Comp_press_up= 0.56e8
Comp_force_
Comp_press_lp= 0.56e8
Comp_force_
compression_
sc_por=0.3
#Read exp data
path_data=
Exp=pd.
Exp.Compression
idxmax_
Exp_loading=
Exp_unloading=
#******
def append_
# Open file in append mode
with open(file_name, 'a+', newline='') as write_obj:
# Create a writer object from csv module
csv_writer = writer(write_obj)
# Add contents of list as last row in the csv file
# Add material
mat1 = O.materials.
# Spheres for compression and walls
sp=pack.
sp.makeCloud(
sp.toSimulation
walls=O.
# Add engines
o.engines = [
ForceResetter(),
InsertionSort
InteractionLoop(
[Ig2_
Ig2_
Ig2_
[Ip2_
[Law2_
),
NewtonIntegra
PyRunner(
#DeformContro
]
def checkForce():
if O.iter < 450000:
return
if unbalancedForce() > 1:
return
global upper_punch
upper_
for i in upper_punch:
body= O.bodies[i]
global lower_punch
lower_punch= O.bodies.
for n in lower_punch:
body= O.bodies[n]
#O.engines = O.engines + [PyRunner(
fCheck.command = 'unloadPlate()'
def unloadPlate():
force_up=0
for i in upper_punch:
body= O.bodies[i]
force_lp=0
for n in lower_punch:
body = O.bodies[n]
force_lp = force_lp + abs(O.forces.
if ((force_up > Comp_force_up) and (force_lp > Comp_force_lp)):
for i in upper_punch:
body= O.bodies[i]
for n in lower_punch:
body= O.bodies[n]
def stopUnloading():
force_up=0
for i in upper_punch:
body= O.bodies[i]
force_lp=0
for n in lower_punch:
body = O.bodies[n]
force_lp = force_lp + abs(O.forces.
if ((force_up==0) and (force_lp==0)):
o.pause()
O.run()
# when running with yade-batch, the script must not finish until the simulation is done fully
# this command will wait for that (has no influence in the non-batch mode)
waitIfBatch()
path_save=
compression_
compression_
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: