conjugateHeatFoam, grid spacing and gradient calculation
Hi all, I'm using the conjugateHeatFoam solver in 1.5-dev.
Part of my model requires that I calculate the gradient of a field. I noticed that one of my gradient values (close to the interface between two regions), is giving me something a little odd, and so I began to investigate.
It appears to me that the conjuagteHeatFoam solver changes the grid spacing close to an interface for each submesh and I think this results in the wrong calculation of the gradient of a non-coupled field on the submesh.
For example, in my test case, I have 3 regions each 0.3m in length (this is a 1D problem) split into 50 nodes each. So, the node-node grid spacing should be 0.3/50 = 0.006 and then the boundary to node grid spacing should be 0.3/50/2 = 0.003.
BUT, when I do an Info << mesh.deltaCoeffs() << endl; on each mesh I do find that the node-node spacing is 0.006 but the boundary to node grid spacing gives an unexpected result on my submeshes.
For the submeshes, I get the following (unexpected) boundary output from mesh.deltaCoeffs():
For my first submesh:
I was able to fix this. In the [at|de]tachPatches.H files, all meshes must be included not just the main mesh.
I believe that these files included in the conjugateHeatFoam solver example are wrong because they only consider the main mesh, not the submeshes. For the majority of cases, it won't make a difference to the solution unless you plan to evaluate the gradient (or use the grid spacing close to the boundary) of a non coupled field on a submesh.
|All times are GMT -4. The time now is 01:29.|