PDE thermal model with heat produced as a function of temperature

2 visualizaciones (últimos 30 días)
Urban Simoncic
Urban Simoncic el 22 de Jul. de 2019
Respondida: Urban Simoncic el 23 de Jul. de 2019
For the steady state heat transfer model I want to specify internal heat source as a function of local temperature. I tried as:
internalHeatSource(myPde, @(location, state) k*state.u, 'cell', 1);
but when I solve the model, I get an error:
Dot indexing is not supported for variables of this type.
Can you explain me how to properly do that?

Respuestas (1)

Urban Simoncic
Urban Simoncic el 23 de Jul. de 2019
Documentation says: "The state data is a structure array with the fields state.u, state.ux, state.uy, state.uz (for 3-D problems), and state.time (for transient problems). The state.u field contains the solution vector. The state.ux, state.uy, state.uz fields are estimates of the solution’s partial derivatives at the corresponding points of the location structure. The state.time field contains time at evaluation points."
When I try to write function handle for internal heat source and print out 'state' variable, it shows that the 'state' is empty. That must be the reason why I can't get 'state.u'.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by