Non constant boundary conditions - PDE modeler toolbox
    6 views (last 30 days)
  
       Show older comments
    
I am trying to implement a boundary condition that depends on the temperature gradient at a specific edge of a 2D cylindrical axisymmetric problem. To do so, I am defining a function that depends on @(location, state). The code is the following:
flux = @(location,state) ...
                         -k_evap(0,state).state.ur.*(location.y >= 0 & location.y <= l_evap & location.y >=              (l_evap+l_adiab) & location.y <= (l_evap+l_adiab+l_cond)) + ...
                         -k_adiab(0,state).*state.ur.*(location.y > l_evap & location.y < (l_evap+l_adiab));
    % Spatial BC 
    thermalBC(thermalModelHP_steady,'Edge',2, 'HeatFlux', 0);                         % Evaporator end plate - Na
    thermalBC(thermalModelHP_steady,'Edge',1, 'HeatFlux', flux,...
        'Vectorized', 'on');                      % Na-wick interface
    thermalBC(thermalModelHP_steady,'Edge',3, 'HeatFlux', 0);                         % Condenser end plate - Na
    % thermalBC(thermalModelHP_steady,'Edge',4, 'HeatFlux', 0);                       % Symmetry (dudx = 0): not needed because the problem is specified as axisymmetric
However, I get the following error:
Dot indexing is not supported for variables of this type.
Someone knows why I get this error?
I defined other (material) properties that are temperature dependent in a similar way and their definition give me no problem... However this one does.
Thanks in advance!
0 Comments
Answers (1)
  Rangesh
      
 on 2 Jan 2024
        Hi Pierluigi, 
I see you are encountering an issue related to "Dot indexing."  
“Dot indexing” involves accessing data fields within a data type known as a “struct”. The “struct” array organizes related data using fields as data containers. Accessing a field is typically done using the dot notation in the form of “structName.fieldName”. 
The error you are encountering usually indicates that the variable is not a struct, thus preventing access. It would be better to check the data type of the variable that is causing the error. 
For more details, you can refer to the following documentation: 
If this doesn't resolve the error, it would be beneficial to provide the complete code to better understand where the problem lies. 
I hope this helps to address your concern. 
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
