heat transfer between particle and surface

skyopener's picture
Submitted by skyopener on Sat, 11/05/2011 - 06:28

hello everyone,
we know that the liggghts has the function in calculating conductive heat transfer between colliding particles.
does liggghts have the avaiable function used to calculate conductive heat transfer between particle and wall when they collide?
thx.
S.L

skyopener's picture

skyopener | Mon, 11/07/2011 - 05:25

thanks for your reply, Christoph

it's great.!!
I have got it with your hint.

first import the stl file using 'fix mesh/gran', then bound the simulation using 'fix wall/gran....'.

another question is:

I have not found an import mesh command both calculating the stress and heat transfer.

if I want to calculate both the stress and conductive heat transfer between particle and the triangle surface at the same time when they collide, does any 'fix mesh/gran' command combined both the stress option and the temperature can be used to deal with this problem? (I have dig the description of the command carefully, but caught nothing)

I deal with this problem alternatively.

step 1: import two stl files with same content.(simulation.stl & temperature.stl, temperature.stl is a copy of simulation.stl)

step 2:One command used to specify the stressAnalysis
>>>fix cad1 all mesh/gran/stressanalysis simulation.stl 1 1.0 0. 0. 0. 0. 0. 0. finnie yes

step 3:Another command used to specify the heat transfer:
>>>fix cad2 all mesh/gran simulation.stl 1 1.0 0. 0. 0. 0. 0. 0. temperature 100
>>>fix granwalls all wall/gran/hertz/history 2 cad cad2 temperature 100

step 4:Add the heat transfer parameter for particles
>>>fix ftco all property/global thermalConductivity peratomtype 5.
>>>fix ftca all property/global thermalCapacity peratomtype 10.
>>>fix heattransfer all heat/gran 300.

step 5:Dump stress and wear
>>>dump dumpstress all mesh/gran/VTK 200 post/dump*.vtk stress wear cad

Although it works fine, I am not sure whether a better solution lies somewhere or not...
also another problem focuses on the dump of temperature on the triangular surface, it seems that the dump command is not available.

any suggestion will be highly appreciated.
thx.!
S.L

ckloss's picture

ckloss | Mon, 11/07/2011 - 08:16

Hi SL,

sure, you can use fix mesh/gran/stressanalysis with the Temp option

>>dump of temperature on the triangular surface, it seems that the dump command is not available.
you're right, I will try to include this in the next release

Christoph

skyopener's picture

skyopener | Mon, 11/07/2011 - 09:15

hi Christoph,
thx for your quickly reply and kindly help.
looking forward to the next release..
Best regards!!!
S.L

Oliver.pasqual | Fri, 12/16/2011 - 13:18

Dear developer,
Is this function avaiable in version 1.5?
perhaps I havn't capture the detail after reading the dump doc.
It will be highly appreciated with your any hint.
Have a nice day

Oliver.

skyopener's picture

skyopener | Sat, 03/17/2012 - 02:35

hello developer,
thanks for the addition of dump mesh temperature in newest version of liggghts.
but some problems confused me:

#1. although temerature can be dumped in the latest version, but things cann't happen as I wish. perhaps something is wrong in my settings.....
several lines in the script are in the following:
>1.set the temperature of mesh.
fix cad all mesh/gran/stressanalysis simple_chute.stl 1 1.0 0. 0. 0. 0. 0. 0. temperature 300 finnie yes
fix tempwalls all wall/gran/hertz/history 1 0 mesh/gran 1 cad temperature 300
>2.set the material property related to heat transfer
#heat transfer
fix ftco all property/global thermalConductivity peratomtype 5.
fix ftca all property/global thermalCapacity peratomtype 10.
fix heattransfer all heat/gran 600.
>3.set the thermo style with f_heattransfer
thermo_style custom step atoms ke c_1 f_heattransfer vol
>4.dump the temperature of mesh
dump dumpstress all mesh/gran/VTK 1000 post/dump*.vtk id stress Temp
but the temperature of the mesh is always 300 even heat is transfered from the particles to surface, perhaps it is hard to calculate the temperature of mesh with the reason that the heatcapacity of the mesh material and the thickness of it are not known. But how can I obtain the conductive heat transfer coefficient or heat flux betwwen the tri-surface and particles. ..

#2.After digged into the source code of dump_mesh.cpp, I am not sure whether it is a trivial error in function DumpMesh::write_item that "SCALARS wear" should be "SCALARS temperature".
if(dump_what & DUMP_TEMP)
{
//write wear data
fprintf(fp,"SCALARS wear float 1\nLOOKUP_TABLE default\n");
for (int i = 0; i < STLList_len; i++) {
for (int j=0;jnTri;j++){
fprintf(fp,"%f\n",STLList[i]->Temp);
//fprintf(fp,"%f\n",(STLList[i]->Area[j]));
}
}
}

#3.I want to obtain the heat transfer coefficient between particles and surface. how can I obtain the heat flux through the surface, is there already an array that records the heat flux value lies in someplace?

#4.as we know, the recent version of liggghts that can dump the mesh temperature is not coupled with openfoam.
so it is possible or not if I change the some codes of the older coupled version.
I have compared the difference between the coupled and the uncoupled version in file dump_mesh.h/cpp, and change the differences. although add a 'double Temp' item in file stl_tri.h.
But the compiled liggghts can't dump this value.

Best regards!
S.L

ckloss's picture

ckloss | Mon, 03/19/2012 - 10:13

>> that "SCALARS wear" should be "SCALARS temperature".
correct - will be fixed in the next release. Thanks!

>>but the temperature of the mesh is always 300 even heat is transfered from the particles to surface
heat transfer within the surface is simply not calculated - b/c that would not make too much sense w/o coupling to FE
what you could do is calculate the heat transfer within the mesh with OF and couple that back.

>>#3.I want to obtain the heat transfer coefficient between particles and surface.
you would have to add code to fix_wall_gran.cpp to store that into an array

>>#4.as we know, the recent version of liggghts that can dump the mesh temperature is not coupled with openfoam.
correct

>>so it is possible or not if I change the some codes of the older coupled version.
sure, if you merge the changes, it's possible

Cheers, Christoph

skyopener's picture

skyopener | Thu, 03/22/2012 - 03:12

hi Christoph,

thanks for your kindly reply.
I added some codes into ligghts and recompile it following your hints, but the result is not clear. perhaps something is missing in the whole process.
I want to dump the heat flux through the script level --- add a keyword "heatflux" in the dump mesh/VTK command line such as stess and wear quantities. the whole process is described as follow:

1. add an array --- "double * heatflux" , to record the heat flux for every tri-surface in stl_tri.h, and do the same things as for the quantity wear in the stl_tri.cpp.
2. add some codes for "heatflux" following the method used for "stress vel ..." in the dump_mesh.h and dump_mesh.cpp.
3. add the heat flux calculation codes in file fix_wall_gran.cpp, the place is where we test wheter heat transfer is calculated for particle and wall or not. that is to say, change the original codes into the following ones..
In function:void FixWallGran::post_force_eval(int vflag).
----------------------------original version----------------------------------
if(fppa_T && fppa_hf && Temp_wall >= 0.) addHeatFlux(i,rsq,area_ratio);
----------------------------changed version---------------------------------
if(fppa_T && fppa_hf && Temp_wall >= 0.){
//add the calculation code here.
//addHeatFlux(i,rsq,area_ratio);
..................
if ((fabs(tcop) < SMALL) || (fabs(tcowall) < SMALL)) hc = 0.;
else hc = 4.*tcop*tcowall/(tcop+tcowall)*sqrt(Acont);
//add the calculated flux into the stldata's array
FixMeshGranList[iFMG]->STLdata->heatflux[iTri] += (Temp_wall-Temp_p[i]) * hc;

//debug
fprintf(screen, "heatflux = %f\n",FixMeshGranList[iFMG]->STLdata->heatflux[iTri]);
}
after recompile liggghts, the dump mesh/VTK command line in the input script was changed with the option of "heatflux".
the the final result of heatflux is zero everywhere for the VTK file of mesh.
it can be sure that the debug info is calculated correctly and print into the screen.
but the value of heatflux can't be dumped.......
few thoughts attack me, whether it need a MPI_Allreduce function added into the code or not?
so could you give me some suggestions on this process.
Thanks for your time.
best regards
S.L

skyopener's picture

skyopener | Thu, 03/29/2012 - 14:54

Hi Christoph,
thanks for your reply.
it's the problem of MPI_allredue, and now it has been fixed and the flux can be obtained from dump mesh/vtk command. and parallel run of the command is fine.
Also the similar method was applied to the cn, I also try to code for the contact number of particles on the mesh in the script level, the parallel run will be tested.
is it possible to contain these codes in the next release?
although it is simple to people who are familiar with codes structure of liggghts, it's a trivial task for those who just use liggghts in the script level, perhaps it will be helpful when they want to compare the conductive and convective heat transfer quantity in the CFD-DEM coupling.
best regards.
S.L

ckloss's picture

ckloss | Mon, 04/02/2012 - 13:31

>>is it possible to contain these codes in the next release?
basically any code, if it is properly written, can be included in the public release. Just email it to me...
(but in fact, the mesh part is currently beeing re-written, so the code would look different in LIGGGHTS 2.0)

Cheers, Christoph