Update Parameter in TimeDependent bc
******************* This email originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address. ******************* Hi, I want to update the expression for a time dependent boundary condition for the incompressible solver. I have defined a bc as <D VAR="u" USERDEFINEDTYPE="TimeDependent" VALUE="A*sin(B*t)" /> <D VAR="v"...> <D VAR="p"...> where A and B are parameters I have defined in the <PARAMETERS> section. After N time steps, I want to update the parameter A. Right now I am using a restart approach. Run nektar for N steps with a value of A. A checkpoint file is written at the end. Then, update the config file with the new value for A and use the checkpoint file as a restart, in order to run another N steps with the new value. This is not the most efficient way though. I have read about the "Coupling" capability but I think it is not suited for this problem as A is not a flow variable. Also considered using the "Boundary conditions from file" but my case is 2D and this capability is currently only implemented for 3D. I think the only option is to modify the source code. Specifically, add a piece of code in DisContField::v_EvaluateBoundaryConditions that reads the parameter A from a file and then updates the boundary condition. However, I am not exactly sure how to modify the parameter A that has been read from the session file. Could you please give me some guidance on how to code that? Thank you. Regards, Guillermo
participants (1)
-
Guillermo Suárez