UDF to change angular velocity after every timestep based on the previous value
Hello,
I am trying to run a simulation where the angular velocity of a dynamic mesh zone changes every time step based on this equation of motion where moment_z is the moment on the two aerofoils defined as one wall. omega_prev + = ((1/I) * (moment_z - (alpha * omega_prev))) When I set up the dynamic mesh with the udf, the initialisation returns an "All compute processes received SIGFPE." error. I am not sure what the cause of this error is. Could someone more knowledgeable please help me solve this? This is the UDF I am using: Code: Code:
#include "udf.h" |
show compilation log
|
Compilation log
Dear Alexander,
Thank you for your response. Here is the compilation log for the udf. Code:
Working... |
this is compilation log I got, when I tried to compile your code
fix these errors, put here revised version of code and describe problems if any Code:
..\..\src\debug.c(18) : error C2275: 'Domain' : illegal use of this type as an expression |
Edited UDF
2 Attachment(s)
Hi Alexander,
Thank you for your response. I made a few changes to the UDF and the method. Instead of using the dynamic mesh method, now I am trying to use the UDF to change the rotational velocity in the Cell Zone conditions tab. I changed the UDF as follows. The rotor shown in the image should depend on the moments on the aerofoils (id 13 and 14). The code compiles without any errors for me. But it seems like the UDF is not being read as the first message I try to print does not appear on the console. There are no options to 'hook' the UDF other than in the Cell Zone conditions tab. Could you please help me solve this issue? Code:
#include "udf.h" |
this is compilation log of your code "without errors"
Code:
..\..\src\debug.c(18) : error C2275: 'Domain' : illegal use of this type as an expression |
Code:
#include "udf.h" |
All times are GMT -4. The time now is 08:30. |