User Tools

Site Tools


contact

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
contact [2020/12/10 22:27]
marijn.nijenhuis
contact [2021/01/05 11:22]
marijn.nijenhuis
Line 16: Line 16:
  
   * Get the development version of SPACAR Light that supports the ''opt.customdyn'' field. See the [[https://github.com/precision-utwente/spalight/tree/contact|development branch on GitHub]].   * Get the development version of SPACAR Light that supports the ''opt.customdyn'' field. See the [[https://github.com/precision-utwente/spalight/tree/contact|development branch on GitHub]].
-  * Use ''opt.customdyn = 'usersig PUSHSIG';'' to have Spacar call the m-file PUSHSIG.m (all of this is case-sensitive)+  * Use ''opt.customdyn = 'usersig PUSHSIG';'' to have Spacar call the m-file PUSHSIG.m (all of this is case-sensitive). This file should be in the same folder as the main SPACAR Light script.
   * This m-file will be called repeatedly, depending on the number of ''opt.loadsteps''. This file contains a function with very specific input and output requirements. If you deviate from the template, you'll very quickly run into errors. Within this function, you'll have available the ''x''-vector, which contains the current positions of all nodes. This information can be used to create custom force profiles. Unfortunately, the node numbering in Spacar (full) is different from SPACAR Light. This is actually by design, and something you usually shouldn't have to deal with. Here, though, you do. The conversion is simple and detailed in the file. Note that this simple conversion may not work whenever you use multiple elements per beam with ''eprops(i).nbeams'' > 1. (The .dat-file shows what the actual conversion should be in all cases.)   * This m-file will be called repeatedly, depending on the number of ''opt.loadsteps''. This file contains a function with very specific input and output requirements. If you deviate from the template, you'll very quickly run into errors. Within this function, you'll have available the ''x''-vector, which contains the current positions of all nodes. This information can be used to create custom force profiles. Unfortunately, the node numbering in Spacar (full) is different from SPACAR Light. This is actually by design, and something you usually shouldn't have to deal with. Here, though, you do. The conversion is simple and detailed in the file. Note that this simple conversion may not work whenever you use multiple elements per beam with ''eprops(i).nbeams'' > 1. (The .dat-file shows what the actual conversion should be in all cases.)
  
Line 136: Line 136:
   * When there is some error with the usersig interface or the particular m-file, debugging can be hard, because you only get the general SPACAR Light error. The log-file will provide some details. For more details, it can be helpful to do a manual Spacar call and see what the error then is: in the command window, do ''spacar(-10,'contact')''.   * When there is some error with the usersig interface or the particular m-file, debugging can be hard, because you only get the general SPACAR Light error. The log-file will provide some details. For more details, it can be helpful to do a manual Spacar call and see what the error then is: in the command window, do ''spacar(-10,'contact')''.
   * The input and output variables of the usersig m-file are strict and cannot be deviated from. If you need additional variables in the usersig m-file, a workaround is to use MATLAB's global variables.   * The input and output variables of the usersig m-file are strict and cannot be deviated from. If you need additional variables in the usersig m-file, a workaround is to use MATLAB's global variables.
 +  * Multiple forces can be specified with a single usersig file. Each row in the ''f''-vector specifies a nodal force. Nodal forces specified with usersig may overwrite any forces specified with SPACAR Light force command, such as ''nprops(i).force''.
contact.txt · Last modified: 2021/01/05 11:22 by marijn.nijenhuis