[Nek5000-users] Mass flow rate and averages
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Feb 18 10:23:44 CST 2016
Hi Pual,
thanks for your answer.
I did some tests, i added your code in my userchk subroutine.
This is what i have wrote:
c-----------------------------------------------------------------------
subroutine userchk
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
c integer mynxo
c-----------------------------------------------------------------------
integer istatus
call domain_size(xmin,xmax,ymin,ymax,zmin,zmax)
!calcolo lunghezza dominio
xlenght = xmax-xmin
!mass flow rate
n = nx1*ny1*nz1*nelv
volf = glsc3(vx,bm1,n)/xlenght
open (UNIT=15,FILE= 'mfr.txt', STATUS ='replace',ACTION= 'write'
& ,iostat=istatus)
write (15,'(A15)') '#time= ',time
write (15,'(2ES15.7)') ,volf
return
end
c-------------------------------------------------------------------------
now, compilation is ok, but when i run the sim, it exit with the
following errors:
call userchk
Program received signal SIGSEGV: Segmentation fault - invalid memory
reference.
Program received signal SIGSEGV: Segmentation fault - invalid memory
reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory
reference.
Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory
reference.
Backtrace for this error:
Backtrace for this error:
#0 0x7F45C00F7777
#1 0x7F45C00F7D7E
#2 0x7F45BF833D3F
#0 0x7F1BDED46777
#1 0x7F1BDED46D7E
#2 0x7F1BDE482D3F
#0 0x7FCA82F99777
#1 0x7FCA82F99D7E
#2 0x7FCA826D5D3F
#0 0x7FE467B7B777
#1 0x7FE467B7BD7E
#2 0x7FE4672B7D3F
#3 0x480C3F in glsc3_ at math.f:1079
#3 0x480C3F in glsc3_ at math.f:1079
#3 0x480C3F in glsc3_ at math.f:1079
#4 0x402A72 in userchk_ at curve.f:53
#4 0x402A72 in userchk_ at curve.f:53
#4 0x402A72 in userchk_ at curve.f:53
#5 0x4035BF in nek_init_ at drive1.f:136
#6 0x402893 in nekton at drive.f:26
#7 0x7F45BF81EEC4
#5 0x4035BF in nek_init_ at drive1.f:136
#6 0x402893 in nekton at drive.f:26
#7 0x7F1BDE46DEC4
#5 0x4035BF in nek_init_ at drive1.f:136
#6 0x402893 in nekton at drive.f:26
#7 0x7FCA826C0EC4
#3 0x480C3F in glsc3_ at math.f:1079
#4 0x402A72 in userchk_ at curve.f:53
#5 0x4035BF in nek_init_ at drive1.f:136
#6 0x402893 in nekton at drive.f:26
#7 0x7FE4672A2EC4
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= EXIT CODE: 139
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault
(signal 11)
This typically refers to a problem with your application.
Please see the FAQ page for debugging suggestions
Obviously i tried to comment the code suggested and it run normally.
Thanks.
Il 17/02/2016 16:22, nek5000-users at lists.mcs.anl.gov ha scritto:
> If you set the mass flow (p54-55) in your periodic channel, the forcing as a function of time
> can be found via:
>
> grep vol logfile
>
> will show lines like:
>
>
> 1989 0.1989000E+01 3.72046E-02 3.99058E-05 1.99996E+00 2.00000E+00 volflow X
>
> Column 1 is step number,
> Column 2 is time.
>
> Column 3 is the mean (in space) pressure gradient, as function of time.
>
> This is the pressure gradient required to sustain a fix mass flow rate.
>
> If you wish to instead prescribe mean pressure gradient, set p54 and 55 = 0 in the .rea
> file and set ffx = 1 (say) in the .usr file.
>
> To get the volumetric flow rate, you can do the following in userchk:
>
> n = nx1*ny1*nz1*nelv
> volf = glsc3(vx,bm1,n)/xlength
>
> where xlength is the domain length. (This example assumes your
> flow is in the x direction.
>
> You can get xlength via:
>
> call domain_size(xmin,xmax,ymin,ymax,zmin,zmax)
>
> xlength = xmax-xmin
>
> Paul
>
> ________________________________________
> From: nek5000-users-bounces at lists.mcs.anl.gov [nek5000-users-bounces at lists.mcs.anl.gov] on behalf of nek5000-users at lists.mcs.anl.gov [nek5000-users at lists.mcs.anl.gov]
> Sent: Wednesday, February 17, 2016 8:14 AM
> To: nek5000-users at lists.mcs.anl.gov
> Subject: [Nek5000-users] Mass flow rate and averages
>
> Hi neks,
> maybe my, will be noob questions, but i am a nek noob.
> I am running a DNS of channel with riblets, now i need to know the
> averages fields and the mass flow rate.
> For the averages fields i have seen in turbChannel example folder, and i
> have seen in turbchannel.usr that there is a subroutine that do it.
> But i didn't understand, if i set fintime(P10) and iotime(P14) and P68
> in rea file, have i always the output?Because in turbchannel example, if
> i set how i already told, i have errors in compilation.
> And the second question is related to the mass flow rate.
> If i set forcing, can i know the relative mass flow rate? Or viceversa,
> if i set the mass flow rate in .rea file, can i know the forcing? Where
> can i read or compute it?
>
> Best regards
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
> _______________________________________________
> Nek5000-users mailing list
> Nek5000-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
More information about the Nek5000-users
mailing list