Hi Lukas -
Thank you again very much for taking the time to answer my
questions and apologies for taking so long to respond. This is a hobby project
for me so I tend to only find time every now and then to work on it.
I’ve made some progress in Hermes by overriding the EssentialBoundaryCondition::value(...)
function. I think this is what I wasn’t understanding before so thanks for that.
I have a few more questions on the API that I was hoping to get
your help with if you have a chance.
For reference this is essentially the problem I’m attempting to
solve in Hermes. The code below is from the Agros2D python script editor:
# model
newdocument("unnamed",
"planar", "heat", 1, 2, "disabled", 1, 1, 0,
"steadystate", 1, 1, 0)
#
boundaries
addboundary("coldside",
"heat_heat_flux", 0, 7000, 250)
addboundary("hotside",
"heat_heat_flux", 0, 4000, 2975)
addboundary("insulated",
"heat_heat_flux", 0, 0, 0)
#
materials
addmaterial("material",
0, 28, 0, 0)
#
edges
addedge(0.000508,
0, 0, 0, 0, "hotside")
addedge(0.000508,
0.000508, 0.000508, 0, 0, "insulated")
addedge(0.000254,
0.000508, 0.000508, 0.000508, 0, "coldside")
addedge(0.000254,
0.00127, 0.000254, 0.000508, 0, "coldside")
addedge(0.000508,
0.00127, 0.000254, 0.00127, 0, "coldside")
addedge(0.000508,
0.0017718, 0.000508, 0.00127, 0, "insulated")
addedge(0,
0.0017718, 0.000508, 0.0017718, 0, "insulated")
addedge(0,
0, 0, 0.0017718, 0, "insulated")
#
labels
addlabel(1e-06,
0.000255, 0, 0, "material")
solve()
1) 1) The value function of the EssentialBoundaryCondition
class has 6 parameters that are passed in: x, y, n_x, t_x, and t_y. I
couldn’t seem to find definitions for these parameters or information on how
they should be used. Is there any information on these parameters that you
could point me at?
2) 2) I’ve overridden the value function
with the heat flux equation from Agros2D (eg.f0 + α(Text - T)) Is this correct? Currently
written as follows:
virtual double value(double x, double y, double n_x, double n_y, double t_x, double t_y) const {
return heatFlux + htCoeff
* temp;
};
3) 3) For
the material property I want to assign values of thermal conductivity and heat
transfer. From looking at the 01-possion example I think I can just use the
following custoWeakFormPossion that overrides Hermes::Hermes2D::WeakForm?
CustomWeakFormPoisson wf("material", new Hermes::Hermes1DFunction<double>(LAMBDA_AL),
new Hermes::Hermes2DFunction<double>(-VOLUME_HEAT_SRC));
Kind Regards,
Graham