Hi,
I was running a simulation of a long pipe to check user subroutine in which I defined density as variable using the ideal gas equation and I got an error as follows.
{
code_saturne_7.1_git/code_saturne-7.1/src/base/cs_field.c Fatal error.
Fortran pointer of rank 1 requested for values of field "velocity",
which have rank 2.
}
I have attached the subroutines, setup and mesh.
Kind regards,
Hyder.
do you have a stack trace so as to know from which functions this was called ? If it is in the user-defined properties, it means some other index might be wrong, since velocity is not mentioned explicitly...
Also, version 7.1 is retired, so I recommend using version 8.0-beta instead, which is being fully tested, and update (bug fixes only) to v8.0 when it is released next June.
For some reason, you have commented the "dt" part out of the subroutine definition. Since the function is a standard function of the code, you must never do that unless you reinstall the code with the same modification in the reference file and call site. This can be a source of the bug.
So first fix this, than test again.
You might also try moving the "irovar" setting from cs_user_parameters to cs_user_model (called earlier) in the same file.
Also, you need to remove the "#pragma weak" line.
If this is not sufficient, comment the calls to field_get_val_s one by one to see which one is responsible, but in this case I would suspect an install issue...
Hello,
I have done everything you described and also installed sauterne version 7.3.0. it seems the error is coming when I call the temperature using { call field_get_val_s(ivarfl(isca(iscalt)),cvar_scalt)} function in the subroutine.
is there a way to solve this problem?
one of the interesting thing is the same subroutine is working well in closed cavity geometry ( no inlet and outlet)
I have attached the improved subroutines.
Best regards,
Hyder.