#5434
at8i
Participant

Thanks, Adrian. After the points you and Stephan made , I realized I need to study OpenLB step by step while I am studying OpenLB’s user guide and sometimes hacking into the examples and changing parameters and etc. to get a better understanding of it.
My end project is simulating a melting solid in a chamber (cylinder) . I wanted to make it simpler for myslef so I decided to look at a 2D circle first. So right now, I am changing a bit of `examples/thermal/galliumMelting2d/galliumMelting2d.cpp`.
I decided to change geometry of the said example as below:
`
`superGeometry.rename(0,4);`

`std::vector<T> center(2,T());
center= lx + converter.getPhysLength(1);
center= lx + 0.5 * converter.getPhysLength(1);
IndicatorCircle2D<T> circle(center,lx);
superGeometry.rename(4,1,circle);`

`std::vector<T> extendwallleft(2,T(0));
extendwallleft = converter.getPhysLength(1);
extendwallleft = 2 * lx + converter.getPhysLength(1);
std::vector<T> originwallleft(2,T(0));
originwallleft = 0.0;
originwallleft = 0.0;
IndicatorCuboid2D<T> wallleft(extendwallleft, originwallleft);`

`std::vector<T> extendwallright(2,T(0));
extendwallright = converter.getPhysLength(1);
extendwallright = 2 * lx + converter.getPhysLength(1) ;
std::vector<T> originwallright(2,T(0));
originwallright = 2 * lx + converter.getPhysLength(1);
originwallright = 0.0;
IndicatorCuboid2D<T> wallright(extendwallright, originwallright);`

`superGeometry.rename(4,2,1,wallleft);
superGeometry.rename(4,3,1,wallright);`
`
lx is radius of the circle and is 2.5 cm (25e-3).
And I also changed lx in ThermalUniConverter converter declaration in main from lx to 2 * lx.
And also prepared geometry in main as below:
`

``````std::vector<T> extend(2,T());
extend = 2 * lx + 2*converter.getPhysLength(1);
extend = 2 * lx  + converter.getPhysLength(1);
std::vector<T> origin(2,T());
IndicatorCuboid2D<T> cuboid(extend, origin);``````

`
The last part I changed was coupling declaration, I changed lx to 2*lx also ly to 2*lx.

I get no error when I am compiling the programm and programm is getting executed as well. The problem is avEnergy value is always zero and is not changing .
I know that walls are not really optimal to initiate the boundaries for a circle 2d but I wanted to make sure that I ma going in the right path? or do I need to change the way I look at the problem?
I would appreciate it if you could point out my mistakes.
Kind Regards
Amir Toosi

• This reply was modified 2 years, 11 months ago by at8i. Reason: code