Skip to content

Reply To: Neumann temperature boundary


Hello Johanna,

Thank you so much for the suggestions. I’ve created an AnalyticalF with SuperLatticeDensity2D and AnalyticalFfromSuperF2D. Then I extracted the temperature data at nx-1 by inputting all the points (nx-1, iY) into the analytical functor. However, I am not quite sure how to use LatticeName.defineRho(…) to set DIFFERENT boundary values. I usually use LatticeName.defineRho(SuperGeometry, MaterialNumber, AnalyticalConst2D) which sets all the boundary cells at the same value. Can you please further suggest on this?

Code snippet:
SuperLatticeDensity2D<T, TDESCRIPTOR> temperature(ADlattice);
AnalyticalFfromSuperF2D<T> AnalyticalTemp(temperature);
T point[2];
T previoustemp[1];
std::vector<T> _c; //initiate a vector to store all the temperature data at nx-1

for (int iY = 0; iY <= ny; iY++){
point[0] = nx-1;
point[1] = iY;
AnalyticalTemp(previoustemp, point); //this calculates the temperature at nx-1
ADlattice.defineRho(…); //got lost here