← Back to team overview

yade-users team mailing list archive

[Question #695065]: ThermoHydro analyses

 

New question #695065 on Yade:
https://answers.launchpad.net/yade/+question/695065

Hello,

I am trying to run a TH analysis with warm fluid going through a cold pack of polydisperse particles using the provided example in [1]. 

When I use a previously compacted, poly-disperse-particle sample for this analysis, the temperature of all particles remains constant at first and then turns to "nan". I was wondering what needs to be adjusted in the thermal and flow engines following the features of the granular sample  under study. The compacted sample can be found here:
https://drive.google.com/file/d/1Bg-TxgnM4DNe_7t8_QOghIxuspoZiY5T/view?usp=sharing

[1] https://gitlab.com/yade-dev/trunk/-/commit/f0c96c63937a666d1fa1529173b554ac74b04456

The MWE follows:

Thanks - Zoheir

###------TH analyses--------###
from yade import pack, ymport
from yade import timing
import numpy as np
import shutil

young=1e9
rad=0.003

mn,mx=Vector3(0.0003548178,0.0003386574,0.0007729061),Vector3(0.0014559856,0.0013972314,0.0018823562999999998) # corners of the initial packing
thermalCond = 2. #W/(mK)
heatCap = 710. #J(kg K) 
t0 = 333.15 #K

# micro properties
r = rad
k = 2.0   # 2*k*r 
Cp = 710.
rho = 2600.
D = 2.*r
m = 4./3.*np.pi*r**2/rho
# macro diffusivity

O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=radians(3),density=2600,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=0.5,frictionAngle=0,density=0,label='walls'))
walls=aabbWalls([mn,mx],thickness=0,material='walls')
wallIds=O.bodies.append(walls)

sp = O.bodies.append(ymport.textExt('ShCube', 'x_y_z_r',color=(0.1,0.1,0.9), material='spheres'))


ThermalEngine = ThermalEngine(dead=1,label='thermal');

newton=NewtonIntegrator(damping=0.2)
intRadius = 1
O.engines=[
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=intRadius),Bo1_Box_Aabb()]),
	InteractionLoop(
		[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intRadius),Ig2_Box_Sphere_ScGeom()],
		[Ip2_FrictMat_FrictMat_FrictPhys()],
		[Law2_ScGeom_FrictPhys_CundallStrack()],label="iloop"
	),
	FlowEngine(dead=1,label="flow",multithread=False),
	ThermalEngine,	GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
	newton
]


for b in O.bodies:
	if isinstance(b.shape, Sphere): 
		b.dynamic=False # mechanically static

flow.dead=0
flow.defTolerance=-1#0.3
flow.meshUpdateInterval=200
flow.useSolver=4
flow.permeabilityFactor= 1
flow.viscosity= 0.001
flow.bndCondIsPressure=[1,1,0,0,0,0]
flow.bndCondValue=[10,0,0,0,0,0]
flow.thermalEngine=True
flow.debug=False
flow.fluidRho = 997
flow.fluidCp = 4181.7
flow.getCHOLMODPerfTimings=True
flow.bndCondIsTemperature=[1,0,0,0,0,0]
flow.thermalEngine=True
flow.thermalBndCondValue=[343.15,0,0,0,0,0]
flow.tZero=t0
flow.pZero=0
#flow.clampKValues=False
flow.maxKdivKmean=1
flow.minKdivmean=0.0001;


thermal.dead=0
thermal.debug=False
thermal.fluidConduction=True
thermal.ignoreFictiousConduction=False#True
#thermal.minimumFluidCondDist=1.89e-5
thermal.conduction=True
thermal.thermoMech=False
thermal.solidThermoMech = False
thermal.fluidThermoMech = False
thermal.advection=True
thermal.bndCondIsTemperature=[0,0,0,0,0,0]
thermal.thermalBndCondValue=[0,0,0,0,0,0]
thermal.fluidK = 0.6069#0.650
thermal.fluidConductionAreaFactor=1.
thermal.particleT0 = t0
thermal.particleDensity=2600.
thermal.particleK = thermalCond
thermal.particleCp = heatCap
thermal.useKernMethod=True
#thermal.useHertzMethod=False
timing.reset()

O.dt=0.1e-5
O.dynDt=False

O.run(1,1)
flow.dead=0

def bodyByPos(x,y,z):
	cBody = O.bodies[1]
	cDist = Vector3(100,100,100)
	for b in O.bodies:
		if isinstance(b.shape, Sphere):
			dist = b.state.pos - Vector3(x,y,z)
			if np.linalg.norm(dist) < np.linalg.norm(cDist):
				cDist = dist
				cBody = b
	print('found closest body ', cBody.id, ' at ', cBody.state.pos)
	return cBody
# Finding a body at the X flow boundary
bodyOfInterest = bodyByPos(0.00035,0.001,0.001)

from yade import plot
def history():
	print(bodyOfInterest.state.temp)
	plot.addData(
		ftemp1=flow.getPoreTemperature((0.00035,0.001,0.001)),
		t=O.time,
		i = O.iter,
		bodyOfIntTemp = O.bodies[bodyOfInterest.id].state.temp
)

O.engines=O.engines+[PyRunner(iterPeriod=5,command='history()',label='recorder')]

plot.plots={'t':(('ftemp1','k-'),('bodyOfIntTemp','r-'))} #
plot.plot()
O.saveTmp()
def ColorScaler():
	for s in O.bodies:

		s.shape.color=scalarOnColorScale(s.state.temp,333,343)

O.engines=O.engines+[PyRunner(command='ColorScaler()',iterPeriod=1)]
ColorScaler()

O.run(1000)


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.