Scalar gradient
I need to calculate during STAR run not only scalar but its' derivatives also. Is there any technique in STAR how to do it? Thanks.
|
Re: Scalar gradient
Yes - look at the OPERATE command. You can load any scalar quantity and then compute gradients
|
Re: Scalar gradient
There is something available in STAR but you have to ask the support how to use it.
You can also use the OPERATE command in Prostar. So you can call prostar during a star run, calculate what you want and write it to a file (print cset). Then you can read that file during the processing of the user subroutine. |
Re: Scalar gradient
Thank you very much for the advices. The main ploblem is to calculate the gradient of the scalar on every time step during transient STAR run. I have asked for the support but there is no reply yet. May be I can run STAR and Prostar simultaneously and call for the command OPERATE from one of the users' subroutines in STAR (to obtain gradient automatically not manually)?
|
Re: Scalar gradient
Yes you can call external programs like prostar from subroutines
CALL SYSTEM('ls -l') But is is probably easier to do it in star. So try to get the answer from the support. |
Re: Scalar gradient
You can try and take a look at nom.inc (automatically placed in your ufile folder if you had ProSTAR write down any standard subroutine there), particularly at the variable SCALAR(IS) and see what you can make of it. I'm guessing that you can use SCALAR(IS) within SORSCA or SORMOM, etc. that runs every time step (but unfortunately, every cell...) and then pass it to POSDAT.F (if you need to do calculations from there) via some COMMON array.
Never tried this before so treat accordingly as just a conjecture... |
Re: Scalar gradient
Thanks a lot everybody. You really help me.
|
All times are GMT -4. The time now is 09:25. |