Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

How to Create Thermal Switch (Thermostat) in Transient Thermal System

    • hari.m.kalepu
      Subscriber

      Hello everyone,

      I have a requirement to create a thermal switch in one of my model for transient thermal analyis. I have a flex heater intergrated with thermostat at specific location, wounded around a small container contains water. I need to raise the temperature of water by 50 deg C by supplying voltage to the heater and once the heater reach to 50 deg C, the switch has to break the circuit and the heater/water will cool down. Agin when the cooled temperature reaches to 30 deg C, the switch has to turn on and heater will generate heat. I am using Internal heat generation input in Ansys but I could not control the heat generation values (my input variable) in fuction of my output temeprature (measured at switch or water).

      I have seen in few posts in learning forum that APDL has a COMBIN37 element which works as thermostat, but I am not so good at scripting for generating the commands in workbench. Is there way I can incorporate this requirement (with "IF" condition) in Workbench using parameters?

      Your suggetions are much helpful.

       

      Thanks

      Hari

    • Chandra Sekaran
      Ansys Employee

      Yes, combin37 is the best approach. I cannot think of a way to do this using WB parameter. But you can use APDL  to many load steps (small time increment) ; check at end of each solve if temperature reached the threshold and then turn the heat gen on or off. Doing this does require some exposure to APDL. Also if you distributed computing then you probably will need to go to POST1 to check the temperature and do a restart.

    • hari.m.kalepu
      Subscriber

      Hi chandra,

      Thank you so much for your reply. As I am not very good in scripting, It seems difficult for me to define inputs for COMBIN37 element as a temperature control valve. I found some useful information in the web at this link https://www.mm.bme.hu/~gyebro/files/ans_help_v182/ans_elem/Hlp_E_COMBIN37.html , but still trying to understand. Could you help me how can I define & connect control nodes K, L to active nodes J & I? Do I need to create J, I nodes on the body for which I assigned Internal heat generation?

      Please advise

      Thanks

      Hari

    • Matthew Middleton
      Ansys Employee

      I have a command snippet which does something along these lines. It gets the temperature at a control node, and uses that temperature in an equation to specify the internal heat generation for the next solve. You would place this command snippet under the analysis branch where loads and supports are seen. It is heavily commented to help you out. There is a large cost in using this approach. In order to check at each time point to control the next point, you have to have a heavy-handed control over the time stepping. That means it enforces one substep per load step, and you can't use the automatic time step adjusting. I suppose you could use automatic time stepping within each load step if you only cared about checking the control node temperature at the end of each load step.

      ! If materials or other setup makes the model non-linear, you should do many susteps here to reduce error since the load function cannot be updated for each iteration within each substep.
      ! In newer Ansys versions, the *do loop is not needed.  You can set multiple load steps and set the command snippet to be evaluated at all load steps in its Details.  In this case, you also don't need the solve command.
      !fini
      !/config,noeldb,0   ! write database during solution
      !/solu
      ! Turn off auto time stepping in Analysis Settings
      !autots,off    ! turn off automatic time stepping
      ! only works with one load step
      *get,nsubstep,common,,stepcm,,int,25    ! Gets number of substeps set in Analysis Settings for the load step set in the command snippet details.
      nsub,1,1,1    ! ensure 1 substep per *do loop solve, which is 1 substep per load step.
      *get,endtime,common,,stepcm,,real,2   ! Gets end time set in Analysis Settings for the load step set in the command snippet details.
      timeinc = (endtime+0.0)/nsubstep
      cmsel,s,Control_node
      ! Control_node is named selection containing one node or vertex
      ! Heat_generation_body must be a named selection containing bodies or elements
      node_num = ndnext(0)
      allsel    ! selected elements and nodes cannot chance during analysis
      *do,sub,1,nsubstep
        /gopr     ! prints out values for each loop iteration for debugging
        *if,sub,eq,1,then
          *get,control_temp,common,,bfcom,,real,1    ! get initial uniform temp for 1st solve, or specifially set temperature load applied to the node (if step applied)
        *else
          control_temp=temp(node_num)   ! get temperature of control node after 1st solve.  Get functions can be used without switching to /post1 processor and the lswrite/lsread complications of switching back to /solu processor
        *endif
        bfe_val= 5*control_temp    ! specify function for heat generation
        ! for NMM units, heat generation values in W/mm^3 are scaled by 1000 in input file (MPA units), so divide value by 1000 and enter into GUI to compare
        ! to values set in command snippet.  For initial temp of 22 C, 5*22 = 110 for heat generation.  Specify 0.11 in GUI, step applied. 
        ! for MKS system, enter same values (no scaling)
        bfe,Heat_generation_body,hgen,,bfe_val
        time,sub*timeinc
        ! final solve is automatically issued by Mechanical after command snippet, so skip it here
        *if,sub,ne,nsubstep,then
          solve
        *endif
      *enddo

Viewing 3 reply threads
  • The topic ‘How to Create Thermal Switch (Thermostat) in Transient Thermal System’ is closed to new replies.
[bingo_chatbox]