Open takeshimg92 opened 2 weeks ago
Hey @takeshimg92!
Thanks for the detailed report. At first glance, I think that the condition is adding some undesired contribution that results in something different to the do-nothing (adiabatic) that you would expect in this case.
This is related to the I/O and will most probably fixed once we fully adopt the geometry-based one, which will have full control on the entities that are substituted by ThermalFace
thanks to the corresponding modeler.
If you still have them, it will be very handy for us to have the test cases corresponding to each of the scenarios.
Thanks in advance and sorry for the inconveniences.
Hi @rubenzorrilla ! Thanks for the reply. Can you help me better understand what you mean by this fully geometry based I/O? I think I am not up to date on this discussion.
Sure. The point is that so far, we had two ways of providing the elements/conditions info:
StructuralMechanicsApplication
, which normally require mixing several element types in one simulation.FluidDynamicsApplication
or the ConvectionDiffusionApplication
, which normally use a single element/condition type.I suspect that the issue you're struggling with comes from the latter. Long story short, all conditions are being substituted by ThermalFace
, including those that you just want to have in the mdpa for the sake of having them (something vary fair to be done).
The geometry-based I/O relies on only writing geometries in the mdpa, something that BTW is the unique thing we should ask to any preprocessor. In other workds, elements/conditions (i.e., physics) must be in the Kratos side. Then the geometries in each model part are substituted by the CreateEntitiesFromGeometries
modeler according to the user needs. Note that these requires reading the mdpa at the AnalysisStage
level. Then the input type in the solver_settings
becomes the use_input_model_part
, so we leave the responsability of setting up the mesh outside the solver.
I see. Thank you for the explanation! For now, I will keep the issue open (if I have time I can push a branch with the test showing the problem).
I see. Thank you for the explanation! For now, I will keep the issue open (if I have time I can push a branch with the test showing the problem).
I think that if you compressing and attachinc the case in here is enough (no need to create a test working with the testing framework).
Hi @rubenzorrilla , I wrote a minimal example here: problematic_example.zip
As a note, in my original comment I was using a LaplacianElement; here I am using a MixedLaplacianElement because I wanted access to temperature gradients, but the conclusion is the same.
Great. We'll try to have a look ASAP.
Description TL;DR: keeping unused Conditions or SubModelParts on the MDPA for a heat problem yields wrong physics. This is a problem I have noticed a few months back, only now reporting on it.
Considering the following simple heat diffusion problem in the ConvectionDiffusionApplication. I generate a tetrahedral mesh with 1263 nodes, corresponding to a beam which is 0.5m x 0.2m x 0.1cm along the x,y, z axes respectively.
Set up a Dirichlet condition at x=0 (surface
x_1
) for temperature T = 100 K. On the x=0.5 surface (call itx_2
) set a flux of -25000 W/m2, corresponding to a total power output of 500W.Setting thermal conductivity to 237 W/mK, the analytical solution for the temperature at x=0.5 is 47.257 K.
Scenario 1: construct MDPA with two submodelparts, x1 and x2, and only keep the Conditions that belong to these groups
Scenario 2: construct MDPA with more submodel parts (because why not?) -- create one at y=0 (
y_1
) and another at y=0.2 (y_2
). Keep the Conditions that belong to these groups (but still only enforce boundary conditions onx_1
andx_2
)Scenario 3: construct MDPA with just the two submodel parts x1 and x2, but keep all conditions (all the surfaces of the beam)
Scenario 4: construct MDPA with the 4 model parts above, but explicitly set the flux to zero at surfaces
y_1
andy_2
I don't understand what is happening here.
Scope ConvectionDiffusionApplication
To Reproduce
My solver settings are standard:
I had the same error using
ThermalFace
andFluxCondition
for element_replace_settings.Expected behavior In all cases, I would have expected temperature at x=0.5 to be equal to 47.257 K. Just having more conditions should not change the results if no additional boundary conditions are passed. Also, explicitly setting fluxes to zero at y_1, y_2 should be enough to replicate the original behavior.
Environment