Error in velocity field definition?
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 36
- Joined: Sat Oct 01, 2016 6:31 pm
Error in velocity field definition?
Hi all,
I just started to try user subroutine to run a simple study with CS 4.0.6 on a Linux MATE machine. I just modified the necessary user subroutines as in guide. However, error prompted "Fortran pointer of rank 1 requested for values of field ". I have checked out some other threads but it seems I do not have those problems ?
Thanks,
Kenneth
I just started to try user subroutine to run a simple study with CS 4.0.6 on a Linux MATE machine. I just modified the necessary user subroutines as in guide. However, error prompted "Fortran pointer of rank 1 requested for values of field ". I have checked out some other threads but it seems I do not have those problems ?
Thanks,
Kenneth
- Attachments
-
- test_bline_chimney.tar.gz
- (2.21 MiB) Downloaded 322 times
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error in velocity field definition?
Hello,
It seems the problem in your case is that ibeta is not defined, so your usphyv routine in not correct.
ibeta (for the thermal expansion field) is only defined with both irovar and a non-SGDH thermal turbulent gradient hypothesis (for example GGDH).
Does the use of ibeta come from an example you used? In this case, where is that example from ?
Regards,
Yvan
It seems the problem in your case is that ibeta is not defined, so your usphyv routine in not correct.
ibeta (for the thermal expansion field) is only defined with both irovar and a non-SGDH thermal turbulent gradient hypothesis (for example GGDH).
Does the use of ibeta come from an example you used? In this case, where is that example from ?
Regards,
Yvan
-
- Posts: 36
- Joined: Sat Oct 01, 2016 6:31 pm
Re: Error in velocity field definition?
Hi Yvan,
The problem is from my coursework, while the steps I followed the tutorial by Hartree Centre. Anyway, I have activated the irovar and the turbulent flux model (Anyway, I not really understand how ibeta will be defined from this, what value it gives?), it now proceeds to "Starting Calculation"...but the listing stucked at the pre-processing, I have done something else wrongly?
Attached is the updated study file.
Thanks,
Kenneth
The problem is from my coursework, while the steps I followed the tutorial by Hartree Centre. Anyway, I have activated the irovar and the turbulent flux model (Anyway, I not really understand how ibeta will be defined from this, what value it gives?), it now proceeds to "Starting Calculation"...but the listing stucked at the pre-processing, I have done something else wrongly?
Attached is the updated study file.
Thanks,
Kenneth
- Attachments
-
- test_bline_chimney.tar.gz
- (3.67 MiB) Downloaded 332 times
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error in velocity field definition?
Hello,
To set up cases, I recommend also building and using a debug version of the code (configured using --enable-debug).
This helps find issues such as here.
In your cs_user_boundary_conditions.f90 file, line 493, you set ii = 2, for scalar 2, but have only one scalar. So you need to fix this setup.
Regards,
Yvan
To set up cases, I recommend also building and using a debug version of the code (configured using --enable-debug).
This helps find issues such as here.
In your cs_user_boundary_conditions.f90 file, line 493, you set ii = 2, for scalar 2, but have only one scalar. So you need to fix this setup.
Regards,
Yvan
-
- Posts: 36
- Joined: Sat Oct 01, 2016 6:31 pm
Re: Error in velocity field definition?
Hi,
Sorry...Is the debug mode need to be configured before creating the study?? or even before installing?
Anyway, how do u you identify the problem if this error always comes up: "Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2." ?
Thanks again,
Kenneth
Sorry...Is the debug mode need to be configured before creating the study?? or even before installing?
Anyway, how do u you identify the problem if this error always comes up: "Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2." ?
Thanks again,
Kenneth
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error in velocity field definition?
Hello,
The debug mode needs to be configured before installing (you can do an install to a secondary path so as to keep your main install for use once the case is debugged).
The identification of the problem is quite indirect:
- the Fortran pointer of rank 1 tells me you used ...get_val_s instead of get_val_v
- looking at your code, I see ...get_val_s is not used for velocity, but for ibeta
- I suspect that if ibeta = 0, iprpfl(ibeta) = 0, which is also the field id for velocity
- I use "grep" to search the source code for the existenc of ibeta
...
Best regards,
Yvan
The debug mode needs to be configured before installing (you can do an install to a secondary path so as to keep your main install for use once the case is debugged).
The identification of the problem is quite indirect:
- the Fortran pointer of rank 1 tells me you used ...get_val_s instead of get_val_v
- looking at your code, I see ...get_val_s is not used for velocity, but for ibeta
- I suspect that if ibeta = 0, iprpfl(ibeta) = 0, which is also the field id for velocity
- I use "grep" to search the source code for the existenc of ibeta
...
Best regards,
Yvan
-
- Posts: 36
- Joined: Sat Oct 01, 2016 6:31 pm
Re: Error in velocity field definition?
Hi...
Isn't get_val_s for scalar field? as I wish to call the scalar temperature values (the boundary condition) to calculate the density?
I cannot understand why do I have to call anything for velocity after all I don specify any velocity inlet etc?
Thanks much!
Isn't get_val_s for scalar field? as I wish to call the scalar temperature values (the boundary condition) to calculate the density?
I cannot understand why do I have to call anything for velocity after all I don specify any velocity inlet etc?
Thanks much!
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error in velocity field definition?
Hello,
You don't have to specify anything for velocity, but the code mixes things up because you reference a field that does not exist (ibeta). Note that you would probably have a clearer error message with 4.3 or 5.0.
Are you using reference files from the coursework, or following it step-by-step ?
Regards,
Yvan
You don't have to specify anything for velocity, but the code mixes things up because you reference a field that does not exist (ibeta). Note that you would probably have a clearer error message with 4.3 or 5.0.
Are you using reference files from the coursework, or following it step-by-step ?
Regards,
Yvan
-
- Posts: 36
- Joined: Sat Oct 01, 2016 6:31 pm
Re: Error in velocity field definition?
Hi...
I See... I followed it step by step.
Rgds,
Kenneth
I See... I followed it step by step.
Rgds,
Kenneth
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Error in velocity field definition?
Hello,
Do you have a "reference setup" from the course which you could compare to your setup (so as to be able to check if you missed a step ?).
Best regards,
Yvan
Do you have a "reference setup" from the course which you could compare to your setup (so as to be able to check if you missed a step ?).
Best regards,
Yvan