From nek5000-users at lists.mcs.anl.gov Mon Sep 1 14:02:19 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 1 Sep 2014 19:02:19 +0000 Subject: [Nek5000-users] Constant mass flow rate in simulation In-Reply-To: References: Message-ID: Dear Paul, Thank you very much for the tips. I've tested my simulation case based on your instruction and it worked perfectly for keeping constant mass flow rate. However, I noticed that in the end of subroutine 'vol_flow', the velocity and pressure filed are forced to achieve constant flow rate. By doing this, would it be like changing the resolved flow field to get fixed flow rate, in which case the flow field is scaled on purpose rather than being solved directly from N-S equations. I don't know whether my understanding of this procedure is right or not. Please point out if I was wrong. Another thing is, in turbulent channel flow, in theory the constant mass flow rate can be achieved by balancing the force (mean pressure gradient) with mean wall shear stress, however this didn't work in my case. Is it because this method is not compatible with spectral method or is there any systematic issue? It would be great if you can give me some clues for my confusions. I really appreciate it. Thank you very much in advance. Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 01 September 2014 18:00 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 1 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: nek5000-users at lists.mcs.anl.gov To: Nek 5000 Subject: Re: [Nek5000-users] Outpost question Message-ID: Content-Type: text/plain; charset="utf-8" Hi Katherine, I was wondering if you had time to check on the parameter to be reset so that I can overwrite previous files? Bonne soir?e, JC 2014-08-15 16:57 GMT+02:00 : > Hi Katherine, > > Thanks for the answer. I knew about the parameter 15 and was not sure > about the 64 bits precision. This is now more clear. > Regarding the overwriting, I had guessed that prepost has a parameter that > needs to be reset, but I haven't been able to figure out which one so far. > That would be very helpful if you can take a quick look at it. > > Thanks a lot and enjoy the end of the summer > ++ > > JC > > > 2014-08-15 16:53 GMT+02:00 : > >> Hi JC, >> >> You should be able to control the outpost frequency and precision using >> the parameters parameter 15 (IOSTEP) and parameter 63, respectively. >> >> So, if you wanted the first 100 steps to output every step, you would set >> something like: >> >> if(istep.le.100) param(15)=1 >> >> To set the precision to 64bit, set param(63)=8, as well. Setting >> param(63) to anything else should default it to 8 byte precision. >> >> As far as overwriting previous fld files, you should be able to reset a >> parameter used in prepost.f that increments the file counter. I haven't >> had a chance to test this, but I can take a look at it last this weekend. >> >> hth. >> Katherine >> >> >> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >> >>> Howdy Nek's, >>> >>> I have a couple questions regarding the ouput of files: >>> >>> 1. How can force, within the code (say in usrchk), some files to be >>> output in 64 bits for high-accuracy checkpointing and other in regular 8 >>> bits for simple visualisation? >>> 2. Say, during the first 1000 iterations, the code outpost a file >>> every single iteration so that I have blah0.f00001 to blah0.f01000. How can >>> I then force the code to outpost my new files (from istep = 1001 to 2000 >>> say) rewriting on blah0.f00001 to blah0.f01000? >>> >>> Thanks a lot. >>> Regards, >>> >>> JC >>> >>> -- >>> Jean-Christophe Loiseau >>> Homepage >>> >>> _______________________________________________ >>> 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 >> >> > > > -- > Jean-Christophe Loiseau > Homepage > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > -- Jean-Christophe Loiseau Homepage -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Tony, I would just set p55=1.0; p54=-1.0 This will fix < u_x > == 1.0 If you are using variable viscosity, this might be problematic, but for the constant viscosity case this is the best way. Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 combination sets the x-body force as needed to ensure the prescribed mass flux is realized. 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: Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: [Nek5000-users] Constant mass flow rate in simulation Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users End of Nek5000-users Digest, Vol 67, Issue 1 ******************************************** From nek5000-users at lists.mcs.anl.gov Mon Sep 1 16:14:40 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 1 Sep 2014 16:14:40 -0500 (CDT) Subject: [Nek5000-users] Constant mass flow rate in simulation In-Reply-To: References: Message-ID: Hi Tony, Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), where BC(0) := homogeneous boundary conditions (4) U = U' + a*U0, (5) p = p' + a*p where a is a constant For fixed flow rate, you need (6) \int U.x_hat dV = constant which implies (7) a = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). That is what the vol_flow routines do. The scheme inherits the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > Dear Paul, > > Thank you very much for the tips. I've tested my simulation case based on > your instruction and it worked perfectly for keeping constant mass flow rate. > However, I noticed that in the end of subroutine 'vol_flow', the velocity and > pressure filed are forced to achieve constant flow rate. By doing this, would > it be like changing the resolved flow field to get fixed flow rate, in which > case the flow field is scaled on purpose rather than being solved directly > from N-S equations. I don't know whether my understanding of this procedure > is right or not. Please point out if I was wrong. > > Another thing is, in turbulent channel flow, in theory the constant mass flow > rate can be achieved by balancing the force (mean pressure gradient) with > mean wall shear stress, however this didn't work in my case. Is it because > this method is not compatible with spectral method or is there any systematic > issue? > > It would be great if you can give me some clues for my confusions. I really > appreciate it. Thank you very much in advance. > > Best regards, Tony > > ________________________________________ From: > nek5000-users-bounces at lists.mcs.anl.gov > on behalf of > nek5000-users-request at lists.mcs.anl.gov > Sent: 01 September 2014 18:00 To: > nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue > 1 > > Send Nek5000-users mailing list submissions to > nek5000-users at lists.mcs.anl.gov > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send > a message with subject or body 'help' to > nek5000-users-request at lists.mcs.anl.gov > > You can reach the person managing the list at > nek5000-users-owner at lists.mcs.anl.gov > > When replying, please edit your Subject line so it is more specific than "Re: > Contents of Nek5000-users digest..." > > > Today's Topics: > > 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass > flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant > mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) > > > ---------------------------------------------------------------------- > > Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: > nek5000-users at lists.mcs.anl.gov To: Nek 5000 > Subject: Re: [Nek5000-users] Outpost > question Message-ID: > Content-Type: > text/plain; charset="utf-8" > > Hi Katherine, > > I was wondering if you had time to check on the parameter to be reset so that > I can overwrite previous files? > > Bonne soir?e, JC > > > 2014-08-15 16:57 GMT+02:00 : > >> Hi Katherine, >> >> Thanks for the answer. I knew about the parameter 15 and was not sure about >> the 64 bits precision. This is now more clear. Regarding the overwriting, I >> had guessed that prepost has a parameter that needs to be reset, but I >> haven't been able to figure out which one so far. That would be very >> helpful if you can take a quick look at it. >> >> Thanks a lot and enjoy the end of the summer ++ >> >> JC >> >> >> 2014-08-15 16:53 GMT+02:00 : >> >>> Hi JC, >>> >>> You should be able to control the outpost frequency and precision using the >>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>> >>> So, if you wanted the first 100 steps to output every step, you would set >>> something like: >>> >>> if(istep.le.100) param(15)=1 >>> >>> To set the precision to 64bit, set param(63)=8, as well. Setting >>> param(63) to anything else should default it to 8 byte precision. >>> >>> As far as overwriting previous fld files, you should be able to reset a >>> parameter used in prepost.f that increments the file counter. I haven't >>> had a chance to test this, but I can take a look at it last this weekend. >>> >>> hth. Katherine >>> >>> >>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>> >>>> Howdy Nek's, >>>> >>>> I have a couple questions regarding the ouput of files: >>>> >>>> 1. How can force, within the code (say in usrchk), some files to be >>>> output in 64 bits for high-accuracy checkpointing and other in regular >>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>> iterations, the code outpost a file every single iteration so that I >>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>> blah0.f00001 to blah0.f01000? >>>> >>>> Thanks a lot. Regards, >>>> >>>> JC >>>> >>>> -- Jean-Christophe Loiseau Homepage >>>> >>>> >>>> _______________________________________________ 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 >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> > > > -- Jean-Christophe Loiseau Homepage > -------------- next part > -------------- An HTML attachment was scrubbed... URL: > > > ------------------------------ > > Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: [Nek5000-users] Constant mass flow > rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: Re: [Nek5000-users] Constant mass > flow rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > > Hi Tony, > > I would just set p55=1.0; p54=-1.0 > > This will fix < u_x > == 1.0 > > If you are using variable viscosity, this might be problematic, but for the > constant viscosity case this is the best way. > > Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 > combination sets the x-body force as needed to ensure the prescribed mass > flux is realized. > > 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: > Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: > [Nek5000-users] Constant mass flow rate in simulation > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > > End of Nek5000-users Digest, Vol 67, Issue 1 > ******************************************** > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > From nek5000-users at lists.mcs.anl.gov Mon Sep 1 17:50:52 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Mon, 1 Sep 2014 17:50:52 -0500 (CDT) Subject: [Nek5000-users] Constant mass flow rate in simulation In-Reply-To: References: Message-ID: Hi Tony, [ A slightly revised response to address a couple of typos..] Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), (3.5) F = alpha*F0 (4) U = U' + alpha*U0, (5) p = p' + alpha*p where BC(0) := homogeneous boundary conditions and alpha is a free paramter. For fixed flow rate, you need (6) \int U.x_hat dV = constant = \int ( U' + alpha U0 ) . x_hat dV which implies (7) alpha = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). The vol_flow routines implement this two-part scheme, which retains the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul > > > On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > >> Dear Paul, >> >> Thank you very much for the tips. I've tested my simulation case based on >> your instruction and it worked perfectly for keeping constant mass flow >> rate. >> However, I noticed that in the end of subroutine 'vol_flow', the velocity >> and >> pressure filed are forced to achieve constant flow rate. By doing this, >> would >> it be like changing the resolved flow field to get fixed flow rate, in >> which >> case the flow field is scaled on purpose rather than being solved directly >> from N-S equations. I don't know whether my understanding of this procedure >> is right or not. Please point out if I was wrong. >> >> Another thing is, in turbulent channel flow, in theory the constant mass >> flow >> rate can be achieved by balancing the force (mean pressure gradient) with >> mean wall shear stress, however this didn't work in my case. Is it because >> this method is not compatible with spectral method or is there any >> systematic >> issue? >> >> It would be great if you can give me some clues for my confusions. I really >> appreciate it. Thank you very much in advance. >> >> Best regards, Tony >> >> ________________________________________ From: >> nek5000-users-bounces at lists.mcs.anl.gov >> on behalf of >> nek5000-users-request at lists.mcs.anl.gov >> Sent: 01 September 2014 18:00 To: >> nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, >> Issue >> 1 >> >> Send Nek5000-users mailing list submissions to >> nek5000-users at lists.mcs.anl.gov >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, >> send >> a message with subject or body 'help' to >> nek5000-users-request at lists.mcs.anl.gov >> >> You can reach the person managing the list at >> nek5000-users-owner at lists.mcs.anl.gov >> >> When replying, please edit your Subject line so it is more specific than >> "Re: >> Contents of Nek5000-users digest..." >> >> >> Today's Topics: >> >> 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant >> mass >> flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant >> mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: >> nek5000-users at lists.mcs.anl.gov To: Nek 5000 >> Subject: Re: [Nek5000-users] Outpost >> question Message-ID: >> >> Content-Type: >> text/plain; charset="utf-8" >> >> Hi Katherine, >> >> I was wondering if you had time to check on the parameter to be reset so >> that >> I can overwrite previous files? >> >> Bonne soir?e, JC >> >> >> 2014-08-15 16:57 GMT+02:00 : >> >>> Hi Katherine, >>> >>> Thanks for the answer. I knew about the parameter 15 and was not sure >>> about >>> the 64 bits precision. This is now more clear. Regarding the overwriting, >>> I >>> had guessed that prepost has a parameter that needs to be reset, but I >>> haven't been able to figure out which one so far. That would be very >>> helpful if you can take a quick look at it. >>> >>> Thanks a lot and enjoy the end of the summer ++ >>> >>> JC >>> >>> >>> 2014-08-15 16:53 GMT+02:00 : >>> >>>> Hi JC, >>>> >>>> You should be able to control the outpost frequency and precision using >>>> the >>>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>>> >>>> So, if you wanted the first 100 steps to output every step, you would set >>>> something like: >>>> >>>> if(istep.le.100) param(15)=1 >>>> >>>> To set the precision to 64bit, set param(63)=8, as well. Setting >>>> param(63) to anything else should default it to 8 byte precision. >>>> >>>> As far as overwriting previous fld files, you should be able to reset a >>>> parameter used in prepost.f that increments the file counter. I haven't >>>> had a chance to test this, but I can take a look at it last this weekend. >>>> >>>> hth. Katherine >>>> >>>> >>>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>>> >>>>> Howdy Nek's, >>>>> >>>>> I have a couple questions regarding the ouput of files: >>>>> >>>>> 1. How can force, within the code (say in usrchk), some files to be >>>>> output in 64 bits for high-accuracy checkpointing and other in >>>>> regular >>>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>>> iterations, the code outpost a file every single iteration so that I >>>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>>> blah0.f00001 to blah0.f01000? >>>>> >>>>> Thanks a lot. Regards, >>>>> >>>>> JC >>>>> >>>>> -- Jean-Christophe Loiseau Homepage >>>>> >>>>> >>>>> _______________________________________________ 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 >>>> >>>> >>> >>> >>> -- Jean-Christophe Loiseau Homepage >>> >>> >>> _______________________________________________ Nek5000-users mailing list >>> Nek5000-users at lists.mcs.anl.gov >>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> -------------- next part >> -------------- An HTML attachment was scrubbed... URL: >> >> >> ------------------------------ >> >> Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: [Nek5000-users] Constant mass >> flow >> rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: Re: [Nek5000-users] Constant >> mass >> flow rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> >> Hi Tony, >> >> I would just set p55=1.0; p54=-1.0 >> >> This will fix < u_x > == 1.0 >> >> If you are using variable viscosity, this might be problematic, but for the >> constant viscosity case this is the best way. >> >> Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 >> combination sets the x-body force as needed to ensure the prescribed mass >> flux is realized. >> >> 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: >> Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov >> Subject: >> [Nek5000-users] Constant mass flow rate in simulation >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> >> End of Nek5000-users Digest, Vol 67, Issue 1 >> ******************************************** >> _______________________________________________ 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 > From nek5000-users at lists.mcs.anl.gov Tue Sep 2 16:19:14 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 02 Sep 2014 17:19:14 -0400 Subject: [Nek5000-users] Wall Clock Time Message-ID: Hello all, I'm interested in comparing the wall clock time for a same run with different number of CPU's. However, the time output seems to always give 0. I have tried using the mpi_wtime and dnekclock functions in the userchk subroutine and it has also been giving me 0 for each processor. I have included the end of my logfile in this email. The last 2 values of the first output line for a time step should give the total wall clock time and step wall clock time, but are both showing 0. At the end of the run, total elapsed time should be shown, but once again the value output is zero. Has anyone figured out a method permitting to obtain the total wall clock time? Thank you, J?r?mie ----------------------- END OF LOGFILE ---------------------------------------------------------------------------- Step 20, t= 4.8774474E-02, DT= 2.4387237E-03, C= 0.501 0.0000E+00 0.0000E+00 Solving for fluid 20 1 4.7138E-02 1.7111E-07 2.7549E+05 15 alph1x 20 halpha 15 -1.1778E-03 1.2672E-01 6.1694E-02 1.1588E-01 5.4007E-02 5.1022E-02 3.1403E-02 2.4425E-02 1.0726E-02 6.0344E-03 20 Hmholtz VELX: 3 2.6011E-13 1.7111E-07 1.0000E-12 20 2 3.4534E-02 2.5050E-07 1.3786E+05 15 alph1x 20 halpha 15 1.8538E-02 1.0186E-01 4.5783E-02 4.5495E-02 4.2007E-02 4.7957E-02 3.7328E-02 2.8192E-02 2.2477E-02 9.2507E-03 20 Hmholtz VELY: 3 3.4751E-13 2.5050E-07 1.0000E-12 20 15 alpha: -2.7079E-06 -1.8713E-04 3.2842E-03 3.7249E-03 2.1355E-03 1.4731E-03 1.7188E-03 3.0469E-03 1.6907E-03 1.1608E-03 20 15 4.0387E-03 7.8105E-07 5.1708E+03 alph12 20 U-PRES gmres: 13 8.2682E-13 1.0000E-12 1.0390E-09 0.0000E+00 0.0000E+00 20 DNORM, DIVEX 8.2682338981824994E-013 8.2682352659334355E-013 20 4.8774E-02 0.0000E+00 Fluid done call outfld: ifpsco: F 20 4.8774E-02 Write checkpoint: 0 20 OPEN: naca24150.f00001 20 4.8774E-02 done :: Write checkpoint file size = 4.4 MB avg data-throughput = InfMB/s io-nodes = 1 end of time-step loop runtime statistics: total time 9.9999999999999995E-008 inv3 time 621 0.0000000000000000 0.0000000000000000 invc time 80 0.0000000000000000 0.0000000000000000 mltd time 1282 0.0000000000000000 0.0000000000000000 cdtp time 1282 0.0000000000000000 0.0000000000000000 eslv time 20 0.0000000000000000 0.0000000000000000 pres time 20 0.0000000000000000 0.0000000000000000 crsl time 565 0.0000000000000000 0.0000000000000000 crsl min 0.0000000000000000 crsl max 0.0000000000000000 crsl avg 0.0000000000000000 hmhz time 8 0.0000000000000000 0.0000000000000000 spro time 21 0.0000000000000000 0.0000000000000000 usbc time 21 0.0000000000000000 0.0000000000000000 usbc min 0.0000000000000000 usbc max 0.0000000000000000 usb avg 0.0000000000000000 axhm time 458 0.0000000000000000 0.0000000000000000 advc time 40 0.0000000000000000 0.0000000000000000 vdss time 622 0.0000000000000000 0.0000000000000000 vdss min 0.0000000000000000 vdss max 0.0000000000000000 vdss avg 0.0000000000000000 dsum time 2139 0.0000000000000000 0.0000000000000000 dsum min 0.0000000000000000 dsum max 0.0000000000000000 dsum avg 0.0000000000000000 dadd time 0 0.0000000000000000 0.0000000000000000 ddsl time 565 0.0000000000000000 0.0000000000000000 solv time 565 0.0000000000000000 0.0000000000000000 prep time 20 0.0000000000000000 0.0000000000000000 # nid tusbc tdadd tcrsl tvdss tdsum tgop qqq F 0 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 qqq 1 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 qqq 2 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 qqq 3 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 qqq 4 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 qqq 5 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 qqq call exitt: dying ... backtrace(): obtained 5 stack frames. ./nek5000(print_stack_+0x1a) [0x4fa15a] ./nek5000(exitt_+0x1a6) [0x5e6b56] ./nek5000(main+0x39) [0x419489] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x2b7993c6076d] ./nek5000() [0x4194b9] total elapsed time : 0.00000E+00 sec total solver time incl. I/O : 0.00000E+00 sec time/timestep : 0.00000E+00 sec CPU seconds/timestep/gridpt : 0.00000E+00 sec From nek5000-users at lists.mcs.anl.gov Tue Sep 2 17:42:00 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 2 Sep 2014 22:42:00 +0000 Subject: [Nek5000-users] Constant mass flow rate in simulation In-Reply-To: References: Message-ID: Dear Paul, Thank you so much for the very detailed and patient explanation. Just a few things want to make clear since my understanding is not good. In the procedure you explained, does the linear combination of (2) and (3) form the flow field at next time step? If so, what's the boundary condition for U' and p'? In the process, actually we are not providing the body force, by working out the alpha value based on current flow field and resolved (U',p') we achieve the target mass flow rate, is that right? By calculating the mean wall shear stress and update the mean pressure gradient (actually the body force) every time step we should be able to fix the rate, I'm just wondering why it doesn't work here? I'm just trying to understand this and I apologise if those questions are actually stupid. I really appreciate your help. Thank you very much. Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 01 September 2014 23:50 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 2 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 2. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Mon, 1 Sep 2014 19:02:19 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear Paul, Thank you very much for the tips. I've tested my simulation case based on your instruction and it worked perfectly for keeping constant mass flow rate. However, I noticed that in the end of subroutine 'vol_flow', the velocity and pressure filed are forced to achieve constant flow rate. By doing this, would it be like changing the resolved flow field to get fixed flow rate, in which case the flow field is scaled on purpose rather than being solved directly from N-S equations. I don't know whether my understanding of this procedure is right or not. Please point out if I was wrong. Another thing is, in turbulent channel flow, in theory the constant mass flow rate can be achieved by balancing the force (mean pressure gradient) with mean wall shear stress, however this didn't work in my case. Is it because this method is not compatible with spectral method or is there any systematic issue? It would be great if you can give me some clues for my confusions. I really appreciate it. Thank you very much in advance. Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 01 September 2014 18:00 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 1 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: nek5000-users at lists.mcs.anl.gov To: Nek 5000 Subject: Re: [Nek5000-users] Outpost question Message-ID: Content-Type: text/plain; charset="utf-8" Hi Katherine, I was wondering if you had time to check on the parameter to be reset so that I can overwrite previous files? Bonne soir?e, JC 2014-08-15 16:57 GMT+02:00 : > Hi Katherine, > > Thanks for the answer. I knew about the parameter 15 and was not sure > about the 64 bits precision. This is now more clear. > Regarding the overwriting, I had guessed that prepost has a parameter that > needs to be reset, but I haven't been able to figure out which one so far. > That would be very helpful if you can take a quick look at it. > > Thanks a lot and enjoy the end of the summer > ++ > > JC > > > 2014-08-15 16:53 GMT+02:00 : > >> Hi JC, >> >> You should be able to control the outpost frequency and precision using >> the parameters parameter 15 (IOSTEP) and parameter 63, respectively. >> >> So, if you wanted the first 100 steps to output every step, you would set >> something like: >> >> if(istep.le.100) param(15)=1 >> >> To set the precision to 64bit, set param(63)=8, as well. Setting >> param(63) to anything else should default it to 8 byte precision. >> >> As far as overwriting previous fld files, you should be able to reset a >> parameter used in prepost.f that increments the file counter. I haven't >> had a chance to test this, but I can take a look at it last this weekend. >> >> hth. >> Katherine >> >> >> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >> >>> Howdy Nek's, >>> >>> I have a couple questions regarding the ouput of files: >>> >>> 1. How can force, within the code (say in usrchk), some files to be >>> output in 64 bits for high-accuracy checkpointing and other in regular 8 >>> bits for simple visualisation? >>> 2. Say, during the first 1000 iterations, the code outpost a file >>> every single iteration so that I have blah0.f00001 to blah0.f01000. How can >>> I then force the code to outpost my new files (from istep = 1001 to 2000 >>> say) rewriting on blah0.f00001 to blah0.f01000? >>> >>> Thanks a lot. >>> Regards, >>> >>> JC >>> >>> -- >>> Jean-Christophe Loiseau >>> Homepage >>> >>> _______________________________________________ >>> 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 >> >> > > > -- > Jean-Christophe Loiseau > Homepage > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > -- Jean-Christophe Loiseau Homepage -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Tony, I would just set p55=1.0; p54=-1.0 This will fix < u_x > == 1.0 If you are using variable viscosity, this might be problematic, but for the constant viscosity case this is the best way. Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 combination sets the x-body force as needed to ensure the prescribed mass flux is realized. 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: Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: [Nek5000-users] Constant mass flow rate in simulation Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users End of Nek5000-users Digest, Vol 67, Issue 1 ******************************************** ------------------------------ Message: 2 Date: Mon, 1 Sep 2014 16:14:40 -0500 (CDT) From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Hi Tony, Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), where BC(0) := homogeneous boundary conditions (4) U = U' + a*U0, (5) p = p' + a*p where a is a constant For fixed flow rate, you need (6) \int U.x_hat dV = constant which implies (7) a = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). That is what the vol_flow routines do. The scheme inherits the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > Dear Paul, > > Thank you very much for the tips. I've tested my simulation case based on > your instruction and it worked perfectly for keeping constant mass flow rate. > However, I noticed that in the end of subroutine 'vol_flow', the velocity and > pressure filed are forced to achieve constant flow rate. By doing this, would > it be like changing the resolved flow field to get fixed flow rate, in which > case the flow field is scaled on purpose rather than being solved directly > from N-S equations. I don't know whether my understanding of this procedure > is right or not. Please point out if I was wrong. > > Another thing is, in turbulent channel flow, in theory the constant mass flow > rate can be achieved by balancing the force (mean pressure gradient) with > mean wall shear stress, however this didn't work in my case. Is it because > this method is not compatible with spectral method or is there any systematic > issue? > > It would be great if you can give me some clues for my confusions. I really > appreciate it. Thank you very much in advance. > > Best regards, Tony > > ________________________________________ From: > nek5000-users-bounces at lists.mcs.anl.gov > on behalf of > nek5000-users-request at lists.mcs.anl.gov > Sent: 01 September 2014 18:00 To: > nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue > 1 > > Send Nek5000-users mailing list submissions to > nek5000-users at lists.mcs.anl.gov > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send > a message with subject or body 'help' to > nek5000-users-request at lists.mcs.anl.gov > > You can reach the person managing the list at > nek5000-users-owner at lists.mcs.anl.gov > > When replying, please edit your Subject line so it is more specific than "Re: > Contents of Nek5000-users digest..." > > > Today's Topics: > > 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass > flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant > mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) > > > ---------------------------------------------------------------------- > > Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: > nek5000-users at lists.mcs.anl.gov To: Nek 5000 > Subject: Re: [Nek5000-users] Outpost > question Message-ID: > Content-Type: > text/plain; charset="utf-8" > > Hi Katherine, > > I was wondering if you had time to check on the parameter to be reset so that > I can overwrite previous files? > > Bonne soir?e, JC > > > 2014-08-15 16:57 GMT+02:00 : > >> Hi Katherine, >> >> Thanks for the answer. I knew about the parameter 15 and was not sure about >> the 64 bits precision. This is now more clear. Regarding the overwriting, I >> had guessed that prepost has a parameter that needs to be reset, but I >> haven't been able to figure out which one so far. That would be very >> helpful if you can take a quick look at it. >> >> Thanks a lot and enjoy the end of the summer ++ >> >> JC >> >> >> 2014-08-15 16:53 GMT+02:00 : >> >>> Hi JC, >>> >>> You should be able to control the outpost frequency and precision using the >>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>> >>> So, if you wanted the first 100 steps to output every step, you would set >>> something like: >>> >>> if(istep.le.100) param(15)=1 >>> >>> To set the precision to 64bit, set param(63)=8, as well. Setting >>> param(63) to anything else should default it to 8 byte precision. >>> >>> As far as overwriting previous fld files, you should be able to reset a >>> parameter used in prepost.f that increments the file counter. I haven't >>> had a chance to test this, but I can take a look at it last this weekend. >>> >>> hth. Katherine >>> >>> >>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>> >>>> Howdy Nek's, >>>> >>>> I have a couple questions regarding the ouput of files: >>>> >>>> 1. How can force, within the code (say in usrchk), some files to be >>>> output in 64 bits for high-accuracy checkpointing and other in regular >>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>> iterations, the code outpost a file every single iteration so that I >>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>> blah0.f00001 to blah0.f01000? >>>> >>>> Thanks a lot. Regards, >>>> >>>> JC >>>> >>>> -- Jean-Christophe Loiseau Homepage >>>> >>>> >>>> _______________________________________________ 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 >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> > > > -- Jean-Christophe Loiseau Homepage > -------------- next part > -------------- An HTML attachment was scrubbed... URL: > > > ------------------------------ > > Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: [Nek5000-users] Constant mass flow > rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: Re: [Nek5000-users] Constant mass > flow rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > > Hi Tony, > > I would just set p55=1.0; p54=-1.0 > > This will fix < u_x > == 1.0 > > If you are using variable viscosity, this might be problematic, but for the > constant viscosity case this is the best way. > > Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 > combination sets the x-body force as needed to ensure the prescribed mass > flux is realized. > > 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: > Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: > [Nek5000-users] Constant mass flow rate in simulation > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > > End of Nek5000-users Digest, Vol 67, Issue 1 > ******************************************** > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > ------------------------------ Message: 3 Date: Mon, 1 Sep 2014 17:50:52 -0500 (CDT) From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Hi Tony, [ A slightly revised response to address a couple of typos..] Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), (3.5) F = alpha*F0 (4) U = U' + alpha*U0, (5) p = p' + alpha*p where BC(0) := homogeneous boundary conditions and alpha is a free paramter. For fixed flow rate, you need (6) \int U.x_hat dV = constant = \int ( U' + alpha U0 ) . x_hat dV which implies (7) alpha = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). The vol_flow routines implement this two-part scheme, which retains the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul > > > On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > >> Dear Paul, >> >> Thank you very much for the tips. I've tested my simulation case based on >> your instruction and it worked perfectly for keeping constant mass flow >> rate. >> However, I noticed that in the end of subroutine 'vol_flow', the velocity >> and >> pressure filed are forced to achieve constant flow rate. By doing this, >> would >> it be like changing the resolved flow field to get fixed flow rate, in >> which >> case the flow field is scaled on purpose rather than being solved directly >> from N-S equations. I don't know whether my understanding of this procedure >> is right or not. Please point out if I was wrong. >> >> Another thing is, in turbulent channel flow, in theory the constant mass >> flow >> rate can be achieved by balancing the force (mean pressure gradient) with >> mean wall shear stress, however this didn't work in my case. Is it because >> this method is not compatible with spectral method or is there any >> systematic >> issue? >> >> It would be great if you can give me some clues for my confusions. I really >> appreciate it. Thank you very much in advance. >> >> Best regards, Tony >> >> ________________________________________ From: >> nek5000-users-bounces at lists.mcs.anl.gov >> on behalf of >> nek5000-users-request at lists.mcs.anl.gov >> Sent: 01 September 2014 18:00 To: >> nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, >> Issue >> 1 >> >> Send Nek5000-users mailing list submissions to >> nek5000-users at lists.mcs.anl.gov >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, >> send >> a message with subject or body 'help' to >> nek5000-users-request at lists.mcs.anl.gov >> >> You can reach the person managing the list at >> nek5000-users-owner at lists.mcs.anl.gov >> >> When replying, please edit your Subject line so it is more specific than >> "Re: >> Contents of Nek5000-users digest..." >> >> >> Today's Topics: >> >> 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant >> mass >> flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant >> mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: >> nek5000-users at lists.mcs.anl.gov To: Nek 5000 >> Subject: Re: [Nek5000-users] Outpost >> question Message-ID: >> >> Content-Type: >> text/plain; charset="utf-8" >> >> Hi Katherine, >> >> I was wondering if you had time to check on the parameter to be reset so >> that >> I can overwrite previous files? >> >> Bonne soir?e, JC >> >> >> 2014-08-15 16:57 GMT+02:00 : >> >>> Hi Katherine, >>> >>> Thanks for the answer. I knew about the parameter 15 and was not sure >>> about >>> the 64 bits precision. This is now more clear. Regarding the overwriting, >>> I >>> had guessed that prepost has a parameter that needs to be reset, but I >>> haven't been able to figure out which one so far. That would be very >>> helpful if you can take a quick look at it. >>> >>> Thanks a lot and enjoy the end of the summer ++ >>> >>> JC >>> >>> >>> 2014-08-15 16:53 GMT+02:00 : >>> >>>> Hi JC, >>>> >>>> You should be able to control the outpost frequency and precision using >>>> the >>>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>>> >>>> So, if you wanted the first 100 steps to output every step, you would set >>>> something like: >>>> >>>> if(istep.le.100) param(15)=1 >>>> >>>> To set the precision to 64bit, set param(63)=8, as well. Setting >>>> param(63) to anything else should default it to 8 byte precision. >>>> >>>> As far as overwriting previous fld files, you should be able to reset a >>>> parameter used in prepost.f that increments the file counter. I haven't >>>> had a chance to test this, but I can take a look at it last this weekend. >>>> >>>> hth. Katherine >>>> >>>> >>>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>>> >>>>> Howdy Nek's, >>>>> >>>>> I have a couple questions regarding the ouput of files: >>>>> >>>>> 1. How can force, within the code (say in usrchk), some files to be >>>>> output in 64 bits for high-accuracy checkpointing and other in >>>>> regular >>>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>>> iterations, the code outpost a file every single iteration so that I >>>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>>> blah0.f00001 to blah0.f01000? >>>>> >>>>> Thanks a lot. Regards, >>>>> >>>>> JC >>>>> >>>>> -- Jean-Christophe Loiseau Homepage >>>>> >>>>> >>>>> _______________________________________________ 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 >>>> >>>> >>> >>> >>> -- Jean-Christophe Loiseau Homepage >>> >>> >>> _______________________________________________ Nek5000-users mailing list >>> Nek5000-users at lists.mcs.anl.gov >>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> -------------- next part >> -------------- An HTML attachment was scrubbed... URL: >> >> >> ------------------------------ >> >> Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: [Nek5000-users] Constant mass >> flow >> rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: Re: [Nek5000-users] Constant >> mass >> flow rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> >> Hi Tony, >> >> I would just set p55=1.0; p54=-1.0 >> >> This will fix < u_x > == 1.0 >> >> If you are using variable viscosity, this might be problematic, but for the >> constant viscosity case this is the best way. >> >> Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 >> combination sets the x-body force as needed to ensure the prescribed mass >> flux is realized. >> >> 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: >> Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov >> Subject: >> [Nek5000-users] Constant mass flow rate in simulation >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> >> End of Nek5000-users Digest, Vol 67, Issue 1 >> ******************************************** >> _______________________________________________ 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 > ------------------------------ _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users End of Nek5000-users Digest, Vol 67, Issue 2 ******************************************** From nek5000-users at lists.mcs.anl.gov Tue Sep 2 20:04:11 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 3 Sep 2014 01:04:11 +0000 Subject: [Nek5000-users] Constant mass flow rate in simulation In-Reply-To: References: , Message-ID: Hi Tony, The main reason that fixing the body force to match the wall shear is that there is a significant fluctuation term in d/dt \int_Omega u(X,t) dV so, you have to balance that term as well. Because homogeneous BCs are used on U0 (no bcs on p, p', or p0), you can use whatever would be the correct boundary conditions for U when updating U'. The net result (solution at the next time step) is: U = U' + a*U0 Does this clarify? Best, Paul PS -- note that the vol_flow rate routines also tell you what ffx(t) is that is required to keep the flow rate fixed, i.e., it tells you what is the requisite body force. A peek at the source reveals in subroutine vol_flow: delta_flow = flow_rate-current_flow c c Note, this scale factor corresponds to FFX, provided FFX has c not also been specified in userf. If ffx is also specified c in userf then the true FFX is given by ffx_userf + scale. c scale = delta_flow/base_flow scale_vf(icvflow) = scale if (nio.eq.0) write(6,1) istep $ ,time,scale,delta_flow,current_flow,flow_rate,chv(icvflow) 1 format(i8,e14.7,1p4e13.5,' volflow',1x,a1) c ________________________________________ 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: Tuesday, September 02, 2014 5:42 PM To: nek5000-users at lists.mcs.anl.gov Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Dear Paul, Thank you so much for the very detailed and patient explanation. Just a few things want to make clear since my understanding is not good. In the procedure you explained, does the linear combination of (2) and (3) form the flow field at next time step? If so, what's the boundary condition for U' and p'? In the process, actually we are not providing the body force, by working out the alpha value based on current flow field and resolved (U',p') we achieve the target mass flow rate, is that right? By calculating the mean wall shear stress and update the mean pressure gradient (actually the body force) every time step we should be able to fix the rate, I'm just wondering why it doesn't work here? I'm just trying to understand this and I apologise if those questions are actually stupid. I really appreciate your help. Thank you very much. Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 01 September 2014 23:50 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 2 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 2. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Mon, 1 Sep 2014 19:02:19 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear Paul, Thank you very much for the tips. I've tested my simulation case based on your instruction and it worked perfectly for keeping constant mass flow rate. However, I noticed that in the end of subroutine 'vol_flow', the velocity and pressure filed are forced to achieve constant flow rate. By doing this, would it be like changing the resolved flow field to get fixed flow rate, in which case the flow field is scaled on purpose rather than being solved directly from N-S equations. I don't know whether my understanding of this procedure is right or not. Please point out if I was wrong. Another thing is, in turbulent channel flow, in theory the constant mass flow rate can be achieved by balancing the force (mean pressure gradient) with mean wall shear stress, however this didn't work in my case. Is it because this method is not compatible with spectral method or is there any systematic issue? It would be great if you can give me some clues for my confusions. I really appreciate it. Thank you very much in advance. Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 01 September 2014 18:00 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 1 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: nek5000-users at lists.mcs.anl.gov To: Nek 5000 Subject: Re: [Nek5000-users] Outpost question Message-ID: Content-Type: text/plain; charset="utf-8" Hi Katherine, I was wondering if you had time to check on the parameter to be reset so that I can overwrite previous files? Bonne soir?e, JC 2014-08-15 16:57 GMT+02:00 : > Hi Katherine, > > Thanks for the answer. I knew about the parameter 15 and was not sure > about the 64 bits precision. This is now more clear. > Regarding the overwriting, I had guessed that prepost has a parameter that > needs to be reset, but I haven't been able to figure out which one so far. > That would be very helpful if you can take a quick look at it. > > Thanks a lot and enjoy the end of the summer > ++ > > JC > > > 2014-08-15 16:53 GMT+02:00 : > >> Hi JC, >> >> You should be able to control the outpost frequency and precision using >> the parameters parameter 15 (IOSTEP) and parameter 63, respectively. >> >> So, if you wanted the first 100 steps to output every step, you would set >> something like: >> >> if(istep.le.100) param(15)=1 >> >> To set the precision to 64bit, set param(63)=8, as well. Setting >> param(63) to anything else should default it to 8 byte precision. >> >> As far as overwriting previous fld files, you should be able to reset a >> parameter used in prepost.f that increments the file counter. I haven't >> had a chance to test this, but I can take a look at it last this weekend. >> >> hth. >> Katherine >> >> >> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >> >>> Howdy Nek's, >>> >>> I have a couple questions regarding the ouput of files: >>> >>> 1. How can force, within the code (say in usrchk), some files to be >>> output in 64 bits for high-accuracy checkpointing and other in regular 8 >>> bits for simple visualisation? >>> 2. Say, during the first 1000 iterations, the code outpost a file >>> every single iteration so that I have blah0.f00001 to blah0.f01000. How can >>> I then force the code to outpost my new files (from istep = 1001 to 2000 >>> say) rewriting on blah0.f00001 to blah0.f01000? >>> >>> Thanks a lot. >>> Regards, >>> >>> JC >>> >>> -- >>> Jean-Christophe Loiseau >>> Homepage >>> >>> _______________________________________________ >>> 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 >> >> > > > -- > Jean-Christophe Loiseau > Homepage > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > -- Jean-Christophe Loiseau Homepage -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Tony, I would just set p55=1.0; p54=-1.0 This will fix < u_x > == 1.0 If you are using variable viscosity, this might be problematic, but for the constant viscosity case this is the best way. Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 combination sets the x-body force as needed to ensure the prescribed mass flux is realized. 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: Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: [Nek5000-users] Constant mass flow rate in simulation Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users End of Nek5000-users Digest, Vol 67, Issue 1 ******************************************** ------------------------------ Message: 2 Date: Mon, 1 Sep 2014 16:14:40 -0500 (CDT) From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Hi Tony, Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), where BC(0) := homogeneous boundary conditions (4) U = U' + a*U0, (5) p = p' + a*p where a is a constant For fixed flow rate, you need (6) \int U.x_hat dV = constant which implies (7) a = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). That is what the vol_flow routines do. The scheme inherits the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > Dear Paul, > > Thank you very much for the tips. I've tested my simulation case based on > your instruction and it worked perfectly for keeping constant mass flow rate. > However, I noticed that in the end of subroutine 'vol_flow', the velocity and > pressure filed are forced to achieve constant flow rate. By doing this, would > it be like changing the resolved flow field to get fixed flow rate, in which > case the flow field is scaled on purpose rather than being solved directly > from N-S equations. I don't know whether my understanding of this procedure > is right or not. Please point out if I was wrong. > > Another thing is, in turbulent channel flow, in theory the constant mass flow > rate can be achieved by balancing the force (mean pressure gradient) with > mean wall shear stress, however this didn't work in my case. Is it because > this method is not compatible with spectral method or is there any systematic > issue? > > It would be great if you can give me some clues for my confusions. I really > appreciate it. Thank you very much in advance. > > Best regards, Tony > > ________________________________________ From: > nek5000-users-bounces at lists.mcs.anl.gov > on behalf of > nek5000-users-request at lists.mcs.anl.gov > Sent: 01 September 2014 18:00 To: > nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue > 1 > > Send Nek5000-users mailing list submissions to > nek5000-users at lists.mcs.anl.gov > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send > a message with subject or body 'help' to > nek5000-users-request at lists.mcs.anl.gov > > You can reach the person managing the list at > nek5000-users-owner at lists.mcs.anl.gov > > When replying, please edit your Subject line so it is more specific than "Re: > Contents of Nek5000-users digest..." > > > Today's Topics: > > 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass > flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant > mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) > > > ---------------------------------------------------------------------- > > Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: > nek5000-users at lists.mcs.anl.gov To: Nek 5000 > Subject: Re: [Nek5000-users] Outpost > question Message-ID: > Content-Type: > text/plain; charset="utf-8" > > Hi Katherine, > > I was wondering if you had time to check on the parameter to be reset so that > I can overwrite previous files? > > Bonne soir?e, JC > > > 2014-08-15 16:57 GMT+02:00 : > >> Hi Katherine, >> >> Thanks for the answer. I knew about the parameter 15 and was not sure about >> the 64 bits precision. This is now more clear. Regarding the overwriting, I >> had guessed that prepost has a parameter that needs to be reset, but I >> haven't been able to figure out which one so far. That would be very >> helpful if you can take a quick look at it. >> >> Thanks a lot and enjoy the end of the summer ++ >> >> JC >> >> >> 2014-08-15 16:53 GMT+02:00 : >> >>> Hi JC, >>> >>> You should be able to control the outpost frequency and precision using the >>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>> >>> So, if you wanted the first 100 steps to output every step, you would set >>> something like: >>> >>> if(istep.le.100) param(15)=1 >>> >>> To set the precision to 64bit, set param(63)=8, as well. Setting >>> param(63) to anything else should default it to 8 byte precision. >>> >>> As far as overwriting previous fld files, you should be able to reset a >>> parameter used in prepost.f that increments the file counter. I haven't >>> had a chance to test this, but I can take a look at it last this weekend. >>> >>> hth. Katherine >>> >>> >>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>> >>>> Howdy Nek's, >>>> >>>> I have a couple questions regarding the ouput of files: >>>> >>>> 1. How can force, within the code (say in usrchk), some files to be >>>> output in 64 bits for high-accuracy checkpointing and other in regular >>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>> iterations, the code outpost a file every single iteration so that I >>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>> blah0.f00001 to blah0.f01000? >>>> >>>> Thanks a lot. Regards, >>>> >>>> JC >>>> >>>> -- Jean-Christophe Loiseau Homepage >>>> >>>> >>>> _______________________________________________ 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 >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> > > > -- Jean-Christophe Loiseau Homepage > -------------- next part > -------------- An HTML attachment was scrubbed... URL: > > > ------------------------------ > > Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: [Nek5000-users] Constant mass flow > rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: Re: [Nek5000-users] Constant mass > flow rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > > Hi Tony, > > I would just set p55=1.0; p54=-1.0 > > This will fix < u_x > == 1.0 > > If you are using variable viscosity, this might be problematic, but for the > constant viscosity case this is the best way. > > Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 > combination sets the x-body force as needed to ensure the prescribed mass > flux is realized. > > 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: > Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: > [Nek5000-users] Constant mass flow rate in simulation > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > > End of Nek5000-users Digest, Vol 67, Issue 1 > ******************************************** > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > ------------------------------ Message: 3 Date: Mon, 1 Sep 2014 17:50:52 -0500 (CDT) From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Hi Tony, [ A slightly revised response to address a couple of typos..] Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), (3.5) F = alpha*F0 (4) U = U' + alpha*U0, (5) p = p' + alpha*p where BC(0) := homogeneous boundary conditions and alpha is a free paramter. For fixed flow rate, you need (6) \int U.x_hat dV = constant = \int ( U' + alpha U0 ) . x_hat dV which implies (7) alpha = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). The vol_flow routines implement this two-part scheme, which retains the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul > > > On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > >> Dear Paul, >> >> Thank you very much for the tips. I've tested my simulation case based on >> your instruction and it worked perfectly for keeping constant mass flow >> rate. >> However, I noticed that in the end of subroutine 'vol_flow', the velocity >> and >> pressure filed are forced to achieve constant flow rate. By doing this, >> would >> it be like changing the resolved flow field to get fixed flow rate, in >> which >> case the flow field is scaled on purpose rather than being solved directly >> from N-S equations. I don't know whether my understanding of this procedure >> is right or not. Please point out if I was wrong. >> >> Another thing is, in turbulent channel flow, in theory the constant mass >> flow >> rate can be achieved by balancing the force (mean pressure gradient) with >> mean wall shear stress, however this didn't work in my case. Is it because >> this method is not compatible with spectral method or is there any >> systematic >> issue? >> >> It would be great if you can give me some clues for my confusions. I really >> appreciate it. Thank you very much in advance. >> >> Best regards, Tony >> >> ________________________________________ From: >> nek5000-users-bounces at lists.mcs.anl.gov >> on behalf of >> nek5000-users-request at lists.mcs.anl.gov >> Sent: 01 September 2014 18:00 To: >> nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, >> Issue >> 1 >> >> Send Nek5000-users mailing list submissions to >> nek5000-users at lists.mcs.anl.gov >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, >> send >> a message with subject or body 'help' to >> nek5000-users-request at lists.mcs.anl.gov >> >> You can reach the person managing the list at >> nek5000-users-owner at lists.mcs.anl.gov >> >> When replying, please edit your Subject line so it is more specific than >> "Re: >> Contents of Nek5000-users digest..." >> >> >> Today's Topics: >> >> 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant >> mass >> flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant >> mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: >> nek5000-users at lists.mcs.anl.gov To: Nek 5000 >> Subject: Re: [Nek5000-users] Outpost >> question Message-ID: >> >> Content-Type: >> text/plain; charset="utf-8" >> >> Hi Katherine, >> >> I was wondering if you had time to check on the parameter to be reset so >> that >> I can overwrite previous files? >> >> Bonne soir?e, JC >> >> >> 2014-08-15 16:57 GMT+02:00 : >> >>> Hi Katherine, >>> >>> Thanks for the answer. I knew about the parameter 15 and was not sure >>> about >>> the 64 bits precision. This is now more clear. Regarding the overwriting, >>> I >>> had guessed that prepost has a parameter that needs to be reset, but I >>> haven't been able to figure out which one so far. That would be very >>> helpful if you can take a quick look at it. >>> >>> Thanks a lot and enjoy the end of the summer ++ >>> >>> JC >>> >>> >>> 2014-08-15 16:53 GMT+02:00 : >>> >>>> Hi JC, >>>> >>>> You should be able to control the outpost frequency and precision using >>>> the >>>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>>> >>>> So, if you wanted the first 100 steps to output every step, you would set >>>> something like: >>>> >>>> if(istep.le.100) param(15)=1 >>>> >>>> To set the precision to 64bit, set param(63)=8, as well. Setting >>>> param(63) to anything else should default it to 8 byte precision. >>>> >>>> As far as overwriting previous fld files, you should be able to reset a >>>> parameter used in prepost.f that increments the file counter. I haven't >>>> had a chance to test this, but I can take a look at it last this weekend. >>>> >>>> hth. Katherine >>>> >>>> >>>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>>> >>>>> Howdy Nek's, >>>>> >>>>> I have a couple questions regarding the ouput of files: >>>>> >>>>> 1. How can force, within the code (say in usrchk), some files to be >>>>> output in 64 bits for high-accuracy checkpointing and other in >>>>> regular >>>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>>> iterations, the code outpost a file every single iteration so that I >>>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>>> blah0.f00001 to blah0.f01000? >>>>> >>>>> Thanks a lot. Regards, >>>>> >>>>> JC >>>>> >>>>> -- Jean-Christophe Loiseau Homepage >>>>> >>>>> >>>>> _______________________________________________ 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 >>>> >>>> >>> >>> >>> -- Jean-Christophe Loiseau Homepage >>> >>> >>> _______________________________________________ Nek5000-users mailing list >>> Nek5000-users at lists.mcs.anl.gov >>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> -------------- next part >> -------------- An HTML attachment was scrubbed... URL: >> >> >> ------------------------------ >> >> Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: [Nek5000-users] Constant mass >> flow >> rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: Re: [Nek5000-users] Constant >> mass >> flow rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> >> Hi Tony, >> >> I would just set p55=1.0; p54=-1.0 >> >> This will fix < u_x > == 1.0 >> >> If you are using variable viscosity, this might be problematic, but for the >> constant viscosity case this is the best way. >> >> Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 >> combination sets the x-body force as needed to ensure the prescribed mass >> flux is realized. >> >> 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: >> Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov >> Subject: >> [Nek5000-users] Constant mass flow rate in simulation >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> >> End of Nek5000-users Digest, Vol 67, Issue 1 >> ******************************************** >> _______________________________________________ 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 > ------------------------------ _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users End of Nek5000-users Digest, Vol 67, Issue 2 ******************************************** _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Wed Sep 3 08:31:53 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 3 Sep 2014 13:31:53 +0000 Subject: [Nek5000-users] Derivatives problem Message-ID: Dear All, Has anyone ever encountered this problem (or has any idea what might be causing this) when using derivatives: (see link to picture) http://s30.postimg.org/vacfvzzv5/problem2.png Something seems to go wrong at the element borders.. Regards, JP -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: problem2.png Type: image/png Size: 30804 bytes Desc: not available URL: From nek5000-users at lists.mcs.anl.gov Wed Sep 3 09:44:03 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 3 Sep 2014 14:44:03 +0000 Subject: [Nek5000-users] Derivatives problem In-Reply-To: References: Message-ID: Hi JP, without context or magnitude, it's very difficult to tell if there is actually a problem with that figure... Do the color fluctuations represent 10^-15? or 10^3 ? With respect to what? What were the initial conditions? What is the quantity being plotted? What is the scale of the color range? etc. If you can provide more information we might be able to help. Best, 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, September 03, 2014 8:31 AM To: nek5000-users Subject: [Nek5000-users] Derivatives problem Dear All, Has anyone ever encountered this problem (or has any idea what might be causing this) when using derivatives: (see link to picture) http://s30.postimg.org/vacfvzzv5/problem2.png Something seems to go wrong at the element borders.. Regards, JP -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Wed Sep 3 09:48:49 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 3 Sep 2014 16:48:49 +0200 Subject: [Nek5000-users] Data Structure of Output Files Message-ID: Hi Neks! I want to convert my nek binary files into hdf5 using Matlab. Am I right that the data structure in nek is as follows: 132 byte header, 4+nel1*4 byte mapping stuff, [3*nel1*lx1*ly1*lz1 byte coordinates], 3*nel1*lx1*ly1*lz1 byte velocity field [, nel1*lx1*ly1*lz1 byte pressure], etc. Where the data structure of u/v/w (and x/y/z) is like u(1...lx1*ly1*lz1,1),v(1...lx1*ly1*lz1,1),w(1...lx1*ly1*lz1,1),u(1...lx1*ly1*lz1,2),v(1...lx1*ly1*lz1,2),... u(1...lx1*ly1*lz1,nel1),v(1...lx1*ly1*lz1,nel1),w(1...lx1*ly1*lz1,nel1) Thanks in advance! Jan F. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Wed Sep 3 13:06:40 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 3 Sep 2014 18:06:40 +0000 Subject: [Nek5000-users] Constant mass flow rate in simulation In-Reply-To: References: Message-ID: Hi Paul, I see. Thank you very much for your help. I appreciate it a lot. By the way, for the fluctuation term you mentioned, is it time derivative of total wall shear? Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 03 September 2014 2:04 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 4 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Wed, 3 Sep 2014 01:04:11 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="us-ascii" Hi Tony, The main reason that fixing the body force to match the wall shear is that there is a significant fluctuation term in d/dt \int_Omega u(X,t) dV so, you have to balance that term as well. Because homogeneous BCs are used on U0 (no bcs on p, p', or p0), you can use whatever would be the correct boundary conditions for U when updating U'. The net result (solution at the next time step) is: U = U' + a*U0 Does this clarify? Best, Paul PS -- note that the vol_flow rate routines also tell you what ffx(t) is that is required to keep the flow rate fixed, i.e., it tells you what is the requisite body force. A peek at the source reveals in subroutine vol_flow: delta_flow = flow_rate-current_flow c c Note, this scale factor corresponds to FFX, provided FFX has c not also been specified in userf. If ffx is also specified c in userf then the true FFX is given by ffx_userf + scale. c scale = delta_flow/base_flow scale_vf(icvflow) = scale if (nio.eq.0) write(6,1) istep $ ,time,scale,delta_flow,current_flow,flow_rate,chv(icvflow) 1 format(i8,e14.7,1p4e13.5,' volflow',1x,a1) c ________________________________________ 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: Tuesday, September 02, 2014 5:42 PM To: nek5000-users at lists.mcs.anl.gov Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Dear Paul, Thank you so much for the very detailed and patient explanation. Just a few things want to make clear since my understanding is not good. In the procedure you explained, does the linear combination of (2) and (3) form the flow field at next time step? If so, what's the boundary condition for U' and p'? In the process, actually we are not providing the body force, by working out the alpha value based on current flow field and resolved (U',p') we achieve the target mass flow rate, is that right? By calculating the mean wall shear stress and update the mean pressure gradient (actually the body force) every time step we should be able to fix the rate, I'm just wondering why it doesn't work here? I'm just trying to understand this and I apologise if those questions are actually stupid. I really appreciate your help. Thank you very much. Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 01 September 2014 23:50 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 2 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 2. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Mon, 1 Sep 2014 19:02:19 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear Paul, Thank you very much for the tips. I've tested my simulation case based on your instruction and it worked perfectly for keeping constant mass flow rate. However, I noticed that in the end of subroutine 'vol_flow', the velocity and pressure filed are forced to achieve constant flow rate. By doing this, would it be like changing the resolved flow field to get fixed flow rate, in which case the flow field is scaled on purpose rather than being solved directly from N-S equations. I don't know whether my understanding of this procedure is right or not. Please point out if I was wrong. Another thing is, in turbulent channel flow, in theory the constant mass flow rate can be achieved by balancing the force (mean pressure gradient) with mean wall shear stress, however this didn't work in my case. Is it because this method is not compatible with spectral method or is there any systematic issue? It would be great if you can give me some clues for my confusions. I really appreciate it. Thank you very much in advance. Best regards, Tony ________________________________________ From: nek5000-users-bounces at lists.mcs.anl.gov on behalf of nek5000-users-request at lists.mcs.anl.gov Sent: 01 September 2014 18:00 To: nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue 1 Send Nek5000-users mailing list submissions to nek5000-users at lists.mcs.anl.gov To subscribe or unsubscribe via the World Wide Web, visit https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send a message with subject or body 'help' to nek5000-users-request at lists.mcs.anl.gov You can reach the person managing the list at nek5000-users-owner at lists.mcs.anl.gov When replying, please edit your Subject line so it is more specific than "Re: Contents of Nek5000-users digest..." Today's Topics: 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) ---------------------------------------------------------------------- Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: nek5000-users at lists.mcs.anl.gov To: Nek 5000 Subject: Re: [Nek5000-users] Outpost question Message-ID: Content-Type: text/plain; charset="utf-8" Hi Katherine, I was wondering if you had time to check on the parameter to be reset so that I can overwrite previous files? Bonne soir?e, JC 2014-08-15 16:57 GMT+02:00 : > Hi Katherine, > > Thanks for the answer. I knew about the parameter 15 and was not sure > about the 64 bits precision. This is now more clear. > Regarding the overwriting, I had guessed that prepost has a parameter that > needs to be reset, but I haven't been able to figure out which one so far. > That would be very helpful if you can take a quick look at it. > > Thanks a lot and enjoy the end of the summer > ++ > > JC > > > 2014-08-15 16:53 GMT+02:00 : > >> Hi JC, >> >> You should be able to control the outpost frequency and precision using >> the parameters parameter 15 (IOSTEP) and parameter 63, respectively. >> >> So, if you wanted the first 100 steps to output every step, you would set >> something like: >> >> if(istep.le.100) param(15)=1 >> >> To set the precision to 64bit, set param(63)=8, as well. Setting >> param(63) to anything else should default it to 8 byte precision. >> >> As far as overwriting previous fld files, you should be able to reset a >> parameter used in prepost.f that increments the file counter. I haven't >> had a chance to test this, but I can take a look at it last this weekend. >> >> hth. >> Katherine >> >> >> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >> >>> Howdy Nek's, >>> >>> I have a couple questions regarding the ouput of files: >>> >>> 1. How can force, within the code (say in usrchk), some files to be >>> output in 64 bits for high-accuracy checkpointing and other in regular 8 >>> bits for simple visualisation? >>> 2. Say, during the first 1000 iterations, the code outpost a file >>> every single iteration so that I have blah0.f00001 to blah0.f01000. How can >>> I then force the code to outpost my new files (from istep = 1001 to 2000 >>> say) rewriting on blah0.f00001 to blah0.f01000? >>> >>> Thanks a lot. >>> Regards, >>> >>> JC >>> >>> -- >>> Jean-Christophe Loiseau >>> Homepage >>> >>> _______________________________________________ >>> 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 >> >> > > > -- > Jean-Christophe Loiseau > Homepage > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > -- Jean-Christophe Loiseau Homepage -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Tony, I would just set p55=1.0; p54=-1.0 This will fix < u_x > == 1.0 If you are using variable viscosity, this might be problematic, but for the constant viscosity case this is the best way. Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 combination sets the x-body force as needed to ensure the prescribed mass flux is realized. 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: Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: [Nek5000-users] Constant mass flow rate in simulation Dear Neks, Recently I've been struggling with constant mass flow rate in my turbulent channel flow simulation. Based on the userchk subroutine in 'turbChannel' tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate the wall shear and then got the mean wall shear. After that I set mean pressure gradient 'ffx' equal to the mean wall shear in order to keep constant mass flow rate. In this case, the flow rate started from 1 (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although the increment was very small at each time step, it never stopped and the bulk mean velocity has increased to 1.002. Is it appropriate to set constant mass flow rate by updating mean pressure gradient based on mean wall shear in Nek5000 or am I using the wrong calculation? Since the bulk mean is still increasing, the simulation is like acceleration channel flow. Does anyone has any clue about how to set constant mass flow rate for turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in advance. Thanks and regards, Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users End of Nek5000-users Digest, Vol 67, Issue 1 ******************************************** ------------------------------ Message: 2 Date: Mon, 1 Sep 2014 16:14:40 -0500 (CDT) From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Hi Tony, Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), where BC(0) := homogeneous boundary conditions (4) U = U' + a*U0, (5) p = p' + a*p where a is a constant For fixed flow rate, you need (6) \int U.x_hat dV = constant which implies (7) a = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). That is what the vol_flow routines do. The scheme inherits the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > Dear Paul, > > Thank you very much for the tips. I've tested my simulation case based on > your instruction and it worked perfectly for keeping constant mass flow rate. > However, I noticed that in the end of subroutine 'vol_flow', the velocity and > pressure filed are forced to achieve constant flow rate. By doing this, would > it be like changing the resolved flow field to get fixed flow rate, in which > case the flow field is scaled on purpose rather than being solved directly > from N-S equations. I don't know whether my understanding of this procedure > is right or not. Please point out if I was wrong. > > Another thing is, in turbulent channel flow, in theory the constant mass flow > rate can be achieved by balancing the force (mean pressure gradient) with > mean wall shear stress, however this didn't work in my case. Is it because > this method is not compatible with spectral method or is there any systematic > issue? > > It would be great if you can give me some clues for my confusions. I really > appreciate it. Thank you very much in advance. > > Best regards, Tony > > ________________________________________ From: > nek5000-users-bounces at lists.mcs.anl.gov > on behalf of > nek5000-users-request at lists.mcs.anl.gov > Sent: 01 September 2014 18:00 To: > nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, Issue > 1 > > Send Nek5000-users mailing list submissions to > nek5000-users at lists.mcs.anl.gov > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, send > a message with subject or body 'help' to > nek5000-users-request at lists.mcs.anl.gov > > You can reach the person managing the list at > nek5000-users-owner at lists.mcs.anl.gov > > When replying, please edit your Subject line so it is more specific than "Re: > Contents of Nek5000-users digest..." > > > Today's Topics: > > 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant mass > flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant > mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) > > > ---------------------------------------------------------------------- > > Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: > nek5000-users at lists.mcs.anl.gov To: Nek 5000 > Subject: Re: [Nek5000-users] Outpost > question Message-ID: > Content-Type: > text/plain; charset="utf-8" > > Hi Katherine, > > I was wondering if you had time to check on the parameter to be reset so that > I can overwrite previous files? > > Bonne soir?e, JC > > > 2014-08-15 16:57 GMT+02:00 : > >> Hi Katherine, >> >> Thanks for the answer. I knew about the parameter 15 and was not sure about >> the 64 bits precision. This is now more clear. Regarding the overwriting, I >> had guessed that prepost has a parameter that needs to be reset, but I >> haven't been able to figure out which one so far. That would be very >> helpful if you can take a quick look at it. >> >> Thanks a lot and enjoy the end of the summer ++ >> >> JC >> >> >> 2014-08-15 16:53 GMT+02:00 : >> >>> Hi JC, >>> >>> You should be able to control the outpost frequency and precision using the >>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>> >>> So, if you wanted the first 100 steps to output every step, you would set >>> something like: >>> >>> if(istep.le.100) param(15)=1 >>> >>> To set the precision to 64bit, set param(63)=8, as well. Setting >>> param(63) to anything else should default it to 8 byte precision. >>> >>> As far as overwriting previous fld files, you should be able to reset a >>> parameter used in prepost.f that increments the file counter. I haven't >>> had a chance to test this, but I can take a look at it last this weekend. >>> >>> hth. Katherine >>> >>> >>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>> >>>> Howdy Nek's, >>>> >>>> I have a couple questions regarding the ouput of files: >>>> >>>> 1. How can force, within the code (say in usrchk), some files to be >>>> output in 64 bits for high-accuracy checkpointing and other in regular >>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>> iterations, the code outpost a file every single iteration so that I >>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>> blah0.f00001 to blah0.f01000? >>>> >>>> Thanks a lot. Regards, >>>> >>>> JC >>>> >>>> -- Jean-Christophe Loiseau Homepage >>>> >>>> >>>> _______________________________________________ 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 >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> > > > -- Jean-Christophe Loiseau Homepage > -------------- next part > -------------- An HTML attachment was scrubbed... URL: > > > ------------------------------ > > Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: [Nek5000-users] Constant mass flow > rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: > nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" > Subject: Re: [Nek5000-users] Constant mass > flow rate in simulation Message-ID: > Content-Type: > text/plain; charset="iso-8859-1" > > > Hi Tony, > > I would just set p55=1.0; p54=-1.0 > > This will fix < u_x > == 1.0 > > If you are using variable viscosity, this might be problematic, but for the > constant viscosity case this is the best way. > > Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 > combination sets the x-body force as needed to ensure the prescribed mass > flux is realized. > > 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: > Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov Subject: > [Nek5000-users] Constant mass flow rate in simulation > > Dear Neks, > > Recently I've been struggling with constant mass flow rate in my turbulent > channel flow simulation. Based on the userchk subroutine in 'turbChannel' > tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate > the wall shear and then got the mean wall shear. After that I set mean > pressure gradient 'ffx' equal to the mean wall shear in order to keep > constant mass flow rate. In this case, the flow rate started from 1 > (nondimensionalised case, bulk mean equal to 1) and kept increasing. Although > the increment was very small at each time step, it never stopped and the bulk > mean velocity has increased to 1.002. > > Is it appropriate to set constant mass flow rate by updating mean pressure > gradient based on mean wall shear in Nek5000 or am I using the wrong > calculation? Since the bulk mean is still increasing, the simulation is like > acceleration channel flow. > > Does anyone has any clue about how to set constant mass flow rate for > turbulent channel flow in Nek5000? Any idea is appreciated and many thanks in > advance. > > Thanks and regards, Tony > > -------------- next part -------------- An HTML attachment was scrubbed... > URL: > > > ------------------------------ > > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > > End of Nek5000-users Digest, Vol 67, Issue 1 > ******************************************** > _______________________________________________ Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > ------------------------------ Message: 3 Date: Mon, 1 Sep 2014 17:50:52 -0500 (CDT) From: nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" Subject: Re: [Nek5000-users] Constant mass flow rate in simulation Message-ID: Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Hi Tony, [ A slightly revised response to address a couple of typos..] Nek uses a semi-implicit formulation in which the nonlinear term is treated explicitly in time. The update is of the form: (1) L(U,p) = NL(u) + BC + F(t) where, L is the linear unsteady Stokes operator, NL() accounts for nonlinear terms and BC accounts for boundary data and F(t) accounts for body force. A fixed flow rate implies that F(t) adjusts to ensure the constant flow rate. Because L is linear, we can split the time advancement into two parts using superposition: (2) L(U',p') = NL(u) + BC (3) L(U0,p0) = F0 + BC(0), (3.5) F = alpha*F0 (4) U = U' + alpha*U0, (5) p = p' + alpha*p where BC(0) := homogeneous boundary conditions and alpha is a free paramter. For fixed flow rate, you need (6) \int U.x_hat dV = constant = \int ( U' + alpha U0 ) . x_hat dV which implies (7) alpha = [ constant - \int U'.x_hat dV ] / [ \int U0.x_hat dV ] Note that (2) is independent of U and time and therefore can be solved in a preprocessing step (assuming dt is fixed and viscosity is time-invariant). The vol_flow routines implement this two-part scheme, which retains the full temporal and spatial accuracy of the constant pressure-drop case. hth, Paul > > > On Mon, 1 Sep 2014, nek5000-users at lists.mcs.anl.gov wrote: > >> Dear Paul, >> >> Thank you very much for the tips. I've tested my simulation case based on >> your instruction and it worked perfectly for keeping constant mass flow >> rate. >> However, I noticed that in the end of subroutine 'vol_flow', the velocity >> and >> pressure filed are forced to achieve constant flow rate. By doing this, >> would >> it be like changing the resolved flow field to get fixed flow rate, in >> which >> case the flow field is scaled on purpose rather than being solved directly >> from N-S equations. I don't know whether my understanding of this procedure >> is right or not. Please point out if I was wrong. >> >> Another thing is, in turbulent channel flow, in theory the constant mass >> flow >> rate can be achieved by balancing the force (mean pressure gradient) with >> mean wall shear stress, however this didn't work in my case. Is it because >> this method is not compatible with spectral method or is there any >> systematic >> issue? >> >> It would be great if you can give me some clues for my confusions. I really >> appreciate it. Thank you very much in advance. >> >> Best regards, Tony >> >> ________________________________________ From: >> nek5000-users-bounces at lists.mcs.anl.gov >> on behalf of >> nek5000-users-request at lists.mcs.anl.gov >> Sent: 01 September 2014 18:00 To: >> nek5000-users at lists.mcs.anl.gov Subject: Nek5000-users Digest, Vol 67, >> Issue >> 1 >> >> Send Nek5000-users mailing list submissions to >> nek5000-users at lists.mcs.anl.gov >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users or, via email, >> send >> a message with subject or body 'help' to >> nek5000-users-request at lists.mcs.anl.gov >> >> You can reach the person managing the list at >> nek5000-users-owner at lists.mcs.anl.gov >> >> When replying, please edit your Subject line so it is more specific than >> "Re: >> Contents of Nek5000-users digest..." >> >> >> Today's Topics: >> >> 1. Re: Outpost question (nek5000-users at lists.mcs.anl.gov) 2. Constant >> mass >> flow rate in simulation (nek5000-users at lists.mcs.anl.gov) 3. Re: Constant >> mass flow rate in simulation (nek5000-users at lists.mcs.anl.gov) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 Date: Sun, 31 Aug 2014 20:17:18 +0200 From: >> nek5000-users at lists.mcs.anl.gov To: Nek 5000 >> Subject: Re: [Nek5000-users] Outpost >> question Message-ID: >> >> Content-Type: >> text/plain; charset="utf-8" >> >> Hi Katherine, >> >> I was wondering if you had time to check on the parameter to be reset so >> that >> I can overwrite previous files? >> >> Bonne soir?e, JC >> >> >> 2014-08-15 16:57 GMT+02:00 : >> >>> Hi Katherine, >>> >>> Thanks for the answer. I knew about the parameter 15 and was not sure >>> about >>> the 64 bits precision. This is now more clear. Regarding the overwriting, >>> I >>> had guessed that prepost has a parameter that needs to be reset, but I >>> haven't been able to figure out which one so far. That would be very >>> helpful if you can take a quick look at it. >>> >>> Thanks a lot and enjoy the end of the summer ++ >>> >>> JC >>> >>> >>> 2014-08-15 16:53 GMT+02:00 : >>> >>>> Hi JC, >>>> >>>> You should be able to control the outpost frequency and precision using >>>> the >>>> parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>>> >>>> So, if you wanted the first 100 steps to output every step, you would set >>>> something like: >>>> >>>> if(istep.le.100) param(15)=1 >>>> >>>> To set the precision to 64bit, set param(63)=8, as well. Setting >>>> param(63) to anything else should default it to 8 byte precision. >>>> >>>> As far as overwriting previous fld files, you should be able to reset a >>>> parameter used in prepost.f that increments the file counter. I haven't >>>> had a chance to test this, but I can take a look at it last this weekend. >>>> >>>> hth. Katherine >>>> >>>> >>>> On Fri, Aug 15, 2014 at 3:34 AM, wrote: >>>> >>>>> Howdy Nek's, >>>>> >>>>> I have a couple questions regarding the ouput of files: >>>>> >>>>> 1. How can force, within the code (say in usrchk), some files to be >>>>> output in 64 bits for high-accuracy checkpointing and other in >>>>> regular >>>>> 8 bits for simple visualisation? 2. Say, during the first 1000 >>>>> iterations, the code outpost a file every single iteration so that I >>>>> have blah0.f00001 to blah0.f01000. How can I then force the code to >>>>> outpost my new files (from istep = 1001 to 2000 say) rewriting on >>>>> blah0.f00001 to blah0.f01000? >>>>> >>>>> Thanks a lot. Regards, >>>>> >>>>> JC >>>>> >>>>> -- Jean-Christophe Loiseau Homepage >>>>> >>>>> >>>>> _______________________________________________ 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 >>>> >>>> >>> >>> >>> -- Jean-Christophe Loiseau Homepage >>> >>> >>> _______________________________________________ Nek5000-users mailing list >>> Nek5000-users at lists.mcs.anl.gov >>> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >>> >>> >> >> >> -- Jean-Christophe Loiseau Homepage >> -------------- next part >> -------------- An HTML attachment was scrubbed... URL: >> >> >> ------------------------------ >> >> Message: 2 Date: Sun, 31 Aug 2014 22:57:27 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: [Nek5000-users] Constant mass >> flow >> rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> Message: 3 Date: Sun, 31 Aug 2014 23:58:32 +0000 From: >> nek5000-users at lists.mcs.anl.gov To: "nek5000-users at lists.mcs.anl.gov" >> Subject: Re: [Nek5000-users] Constant >> mass >> flow rate in simulation Message-ID: >> >> Content-Type: >> text/plain; charset="iso-8859-1" >> >> >> Hi Tony, >> >> I would just set p55=1.0; p54=-1.0 >> >> This will fix < u_x > == 1.0 >> >> If you are using variable viscosity, this might be problematic, but for the >> constant viscosity case this is the best way. >> >> Be certain to also set ffx=ffy=ffz=0 in the .usr file, the the p54/p55 >> combination sets the x-body force as needed to ensure the prescribed mass >> flux is realized. >> >> 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: >> Sunday, August 31, 2014 5:57 PM To: nek5000-users at lists.mcs.anl.gov >> Subject: >> [Nek5000-users] Constant mass flow rate in simulation >> >> Dear Neks, >> >> Recently I've been struggling with constant mass flow rate in my turbulent >> channel flow simulation. Based on the userchk subroutine in 'turbChannel' >> tutorial case, I also used torque_calc(1.0,x0,.false.,.false.) to calculate >> the wall shear and then got the mean wall shear. After that I set mean >> pressure gradient 'ffx' equal to the mean wall shear in order to keep >> constant mass flow rate. In this case, the flow rate started from 1 >> (nondimensionalised case, bulk mean equal to 1) and kept increasing. >> Although >> the increment was very small at each time step, it never stopped and the >> bulk >> mean velocity has increased to 1.002. >> >> Is it appropriate to set constant mass flow rate by updating mean pressure >> gradient based on mean wall shear in Nek5000 or am I using the wrong >> calculation? Since the bulk mean is still increasing, the simulation is >> like >> acceleration channel flow. >> >> Does anyone has any clue about how to set constant mass flow rate for >> turbulent channel flow in Nek5000? Any idea is appreciated and many thanks >> in >> advance. >> >> Thanks and regards, Tony >> >> -------------- next part -------------- An HTML attachment was scrubbed... >> URL: >> >> >> ------------------------------ >> >> _______________________________________________ Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> >> End of Nek5000-users Digest, Vol 67, Issue 1 >> ******************************************** >> _______________________________________________ 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 > ------------------------------ _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users End of Nek5000-users Digest, Vol 67, Issue 2 ******************************************** _______________________________________________ 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 End of Nek5000-users Digest, Vol 67, Issue 4 ******************************************** From nek5000-users at lists.mcs.anl.gov Wed Sep 3 13:51:47 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 3 Sep 2014 18:51:47 +0000 Subject: [Nek5000-users] Linking ESSL Lib to nek5000 Message-ID: Hi Aleks, I followed your suggestion and changed the path in makenek to # linking flags USR_LFLAGS="-L/bgsys/local/lib -lesslbg" This where ESSL lib is found on BG/Q Juqueen in Juelich. When I run makenek, I get the following error message. mpixlf77 -qsuppress=cmpmsg -o nek5000 obj/G1_96.o obj/drive.o obj/drive1.o obj/drive2.o obj/plan4.o obj/bdry.o obj/coef.o obj/conduct.o obj/connect1.o obj/connect2.o obj/dssum.o obj/edgec.o obj/eigsolv.o obj/gauss.o obj/genxyz.o obj/navier1.o obj/makeq.o obj/navier0.o obj/navier2.o obj/navier3.o obj/navier4.o obj/prepost.o obj/speclib.o obj/map2.o obj/turb.o obj/mvmesh.o obj/ic.o obj/ssolv.o obj/planx.o obj/math.o obj/mxm_wrapper.o obj/hmholtz.o obj/gfdm_par.o obj/gfdm_op.o obj/gfdm_solve.o obj/subs1.o obj/subs2.o obj/genbox.o obj/gmres.o obj/hsmg.o obj/convect.o obj/induct.o obj/perturb.o obj/navier5.o obj/navier6.o obj/navier7.o obj/navier8.o obj/fast3d.o obj/fasts.o obj/calcz.o obj/byte.o obj/chelpers.o obj/byte_mpi.o obj/postpro.o obj/cvode_driver.o obj/nek_comm.o obj/init_plugin.o obj/setprop.o obj/qthermal.o obj/cvode_aux.o obj/makeq_aux.o obj/papi.o obj/nek_in_situ.o obj/mxm_std.o obj/blas.o obj/comm_mpi.o obj/singlmesh.o obj/dsygv.o obj/ssygv.o obj/jl_gs.o obj/jl_sort.o obj/jl_sarray_transfer.o obj/jl_sarray_sort.o obj/jl_gs_local.o obj/jl_crystal.o obj/jl_comm.o obj/jl_tensor.o obj/jl_fail.o obj/jl_fcrystal.o obj/jl_findpts.o obj/jl_findpts_local.o obj/jl_obbox.o obj/jl_poly.o obj/jl_lob_bnd.o obj/jl_findpts_el_3.o obj/jl_findpts_el_2.o obj/jl_amg.o obj/jl_fcrs.o -L/bgsys/local/lib -lesslbg /bgsys/local/lib/libesslbg.a(emon.o):(.text+0x150): undefined reference to `_xlf_create_threadlocal' make: *** [nek5000] Error 1 Do you know what went wrong? Thanks, Joerg. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Wed Sep 3 15:40:44 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 3 Sep 2014 20:40:44 +0000 Subject: [Nek5000-users] Linking ESSL Lib to nek5000 In-Reply-To: References: Message-ID: Hi Joerg, Could you try thread-safe compilers, mpixlf77_r mpicc_r before I start asking around? Thanks. Aleks ________________________________ 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, September 03, 2014 1:51 PM To: nek5000-users at lists.mcs.anl.gov Subject: [Nek5000-users] Linking ESSL Lib to nek5000 Hi Aleks, I followed your suggestion and changed the path in makenek to # linking flags USR_LFLAGS="-L/bgsys/local/lib -lesslbg" This where ESSL lib is found on BG/Q Juqueen in Juelich. When I run makenek, I get the following error message. mpixlf77 -qsuppress=cmpmsg -o nek5000 obj/G1_96.o obj/drive.o obj/drive1.o obj/drive2.o obj/plan4.o obj/bdry.o obj/coef.o obj/conduct.o obj/connect1.o obj/connect2.o obj/dssum.o obj/edgec.o obj/eigsolv.o obj/gauss.o obj/genxyz.o obj/navier1.o obj/makeq.o obj/navier0.o obj/navier2.o obj/navier3.o obj/navier4.o obj/prepost.o obj/speclib.o obj/map2.o obj/turb.o obj/mvmesh.o obj/ic.o obj/ssolv.o obj/planx.o obj/math.o obj/mxm_wrapper.o obj/hmholtz.o obj/gfdm_par.o obj/gfdm_op.o obj/gfdm_solve.o obj/subs1.o obj/subs2.o obj/genbox.o obj/gmres.o obj/hsmg.o obj/convect.o obj/induct.o obj/perturb.o obj/navier5.o obj/navier6.o obj/navier7.o obj/navier8.o obj/fast3d.o obj/fasts.o obj/calcz.o obj/byte.o obj/chelpers.o obj/byte_mpi.o obj/postpro.o obj/cvode_driver.o obj/nek_comm.o obj/init_plugin.o obj/setprop.o obj/qthermal.o obj/cvode_aux.o obj/makeq_aux.o obj/papi.o obj/nek_in_situ.o obj/mxm_std.o obj/blas.o obj/comm_mpi.o obj/singlmesh.o obj/dsygv.o obj/ssygv.o obj/jl_gs.o obj/jl_sort.o obj/jl_sarray_transfer.o obj/jl_sarray_sort.o obj/jl_gs_local.o obj/jl_crystal.o obj/jl_comm.o obj/jl_tensor.o obj/jl_fail.o obj/jl_fcrystal.o obj/jl_findpts.o obj/jl_findpts_local.o obj/jl_obbox.o obj/jl_poly.o obj/jl_lob_bnd.o obj/jl_findpts_el_3.o obj/jl_findpts_el_2.o obj/jl_amg.o obj/jl_fcrs.o -L/bgsys/local/lib -lesslbg /bgsys/local/lib/libesslbg.a(emon.o):(.text+0x150): undefined reference to `_xlf_create_threadlocal' make: *** [nek5000] Error 1 Do you know what went wrong? Thanks, Joerg. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 4 09:17:35 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 4 Sep 2014 14:17:35 +0000 Subject: [Nek5000-users] Linking ESSL Lib to nek5000 In-Reply-To: References: Message-ID: Hi Aleks, just to give a feedback to all. 1/ mpixlf77_r instead of mpixlf77 works successfully. 2/ Including the lib (in this case IBM ESSL Library) works via makenek is also O.K. In my case (BG/Q): # linking flags USR_LFLAGS="-L/bgsys/local/lib -lesslbg" Thanks once more, Joerg. Hi Joerg, Could you try thread-safe compilers, mpixlf77_r mpicc_r before I start asking around? Thanks. Aleks ________________________________ 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, September 03, 2014 1:51 PM To: nek5000-users at lists.mcs.anl.gov Subject: [Nek5000-users] Linking ESSL Lib to nek5000 Hi Aleks, I followed your suggestion and changed the path in makenek to # linking flags USR_LFLAGS="-L/bgsys/local/lib -lesslbg" This where ESSL lib is found on BG/Q Juqueen in Juelich. When I run makenek, I get the following error message. mpixlf77 -qsuppress=cmpmsg -o nek5000 obj/G1_96.o obj/drive.o obj/drive1.o obj/drive2.o obj/plan4.o obj/bdry.o obj/coef.o obj/conduct.o obj/connect1.o obj/connect2.o obj/dssum.o obj/edgec.o obj/eigsolv.o obj/gauss.o obj/genxyz.o obj/navier1.o obj/makeq.o obj/navier0.o obj/navier2.o obj/navier3.o obj/navier4.o obj/prepost.o obj/speclib.o obj/map2.o obj/turb.o obj/mvmesh.o obj/ic.o obj/ssolv.o obj/planx.o obj/math.o obj/mxm_wrapper.o obj/hmholtz.o obj/gfdm_par.o obj/gfdm_op.o obj/gfdm_solve.o obj/subs1.o obj/subs2.o obj/genbox.o obj/gmres.o obj/hsmg.o obj/convect.o obj/induct.o obj/perturb.o obj/navier5.o obj/navier6.o obj/navier7.o obj/navier8.o obj/fast3d.o obj/fasts.o obj/calcz.o obj/byte.o obj/chelpers.o obj/byte_mpi.o obj/postpro.o obj/cvode_driver.o obj/nek_comm.o obj/init_plugin.o obj/setprop.o obj/qthermal.o obj/cvode_aux.o obj/makeq_aux.o obj/papi.o obj/nek_in_situ.o obj/mxm_std.o obj/blas.o obj/comm_mpi.o obj/singlmesh.o obj/dsygv.o obj/ssygv.o obj/jl_gs.o obj/jl_sort.o obj/jl_sarray_transfer.o obj/jl_sarray_sort.o obj/jl_gs_local.o obj/jl_crystal.o obj/jl_comm.o obj/jl_tensor.o obj/jl_fail.o obj/jl_fcrystal.o obj/jl_findpts.o obj/jl_findpts_local.o obj/jl_obbox.o obj/jl_poly.o obj/jl_lob_bnd.o obj/jl_findpts_el_3.o obj/jl_findpts_el_2.o obj/jl_amg.o obj/jl_fcrs.o -L/bgsys/local/lib -lesslbg /bgsys/local/lib/libesslbg.a(emon.o):(.text+0x150): undefined reference to `_xlf_create_threadlocal' make: *** [nek5000] Error 1 Do you know what went wrong? Thanks, Joerg. _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 4 13:09:11 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 4 Sep 2014 13:09:11 -0500 Subject: [Nek5000-users] Wall Clock Time In-Reply-To: References: Message-ID: Hi, What compiler and platform are you running on? Also what MPI implementation are you using? Thanks Katherine On Tue, Sep 2, 2014 at 4:19 PM, wrote: > Hello all, > > I'm interested in comparing the wall clock time for a same run with > different number of CPU's. However, the time output seems to always give 0. > I have tried using the mpi_wtime and dnekclock functions in the userchk > subroutine and it has also been giving me 0 for each processor. I have > included the end of my logfile in this email. The last 2 values of the > first output line for a time step should give the total wall clock time and > step wall clock time, but are both showing 0. At the end of the run, total > elapsed time should be shown, but once again the value output is zero. > > Has anyone figured out a method permitting to obtain the total wall clock > time? > > Thank you, > > J?r?mie > > ----------------------- END OF LOGFILE ------------------------------ > ---------------------------------------------- > > > Step 20, t= 4.8774474E-02, DT= 2.4387237E-03, C= 0.501 0.0000E+00 > 0.0000E+00 > Solving for fluid > 20 1 4.7138E-02 1.7111E-07 2.7549E+05 15 alph1x > 20 halpha 15 -1.1778E-03 1.2672E-01 6.1694E-02 1.1588E-01 > 5.4007E-02 5.1022E-02 3.1403E-02 2.4425E-02 1.0726E-02 6.0344E-03 > > 20 Hmholtz VELX: 3 2.6011E-13 1.7111E-07 1.0000E-12 > 20 2 3.4534E-02 2.5050E-07 1.3786E+05 15 alph1x > 20 halpha 15 1.8538E-02 1.0186E-01 4.5783E-02 4.5495E-02 > 4.2007E-02 4.7957E-02 3.7328E-02 2.8192E-02 2.2477E-02 9.2507E-03 > > 20 Hmholtz VELY: 3 3.4751E-13 2.5050E-07 1.0000E-12 > 20 15 alpha: -2.7079E-06 -1.8713E-04 3.2842E-03 3.7249E-03 > 2.1355E-03 1.4731E-03 1.7188E-03 3.0469E-03 1.6907E-03 1.1608E-03 > 20 15 4.0387E-03 7.8105E-07 5.1708E+03 alph12 > 20 U-PRES gmres: 13 8.2682E-13 1.0000E-12 1.0390E-09 > 0.0000E+00 0.0000E+00 > 20 DNORM, DIVEX 8.2682338981824994E-013 > 8.2682352659334355E-013 > 20 4.8774E-02 0.0000E+00 Fluid done > call outfld: ifpsco: F > > 20 4.8774E-02 Write checkpoint: > 0 20 OPEN: naca24150.f00001 > > 20 4.8774E-02 done :: Write checkpoint > file size = 4.4 MB > avg data-throughput = InfMB/s > io-nodes = 1 > > > end of time-step loop > > runtime statistics: > total time 9.9999999999999995E-008 > inv3 time 621 0.0000000000000000 0.0000000000000000 > invc time 80 0.0000000000000000 0.0000000000000000 > mltd time 1282 0.0000000000000000 0.0000000000000000 > cdtp time 1282 0.0000000000000000 0.0000000000000000 > eslv time 20 0.0000000000000000 0.0000000000000000 > pres time 20 0.0000000000000000 0.0000000000000000 > crsl time 565 0.0000000000000000 0.0000000000000000 > crsl min 0.0000000000000000 > crsl max 0.0000000000000000 > crsl avg 0.0000000000000000 > hmhz time 8 0.0000000000000000 0.0000000000000000 > spro time 21 0.0000000000000000 0.0000000000000000 > usbc time 21 0.0000000000000000 0.0000000000000000 > usbc min 0.0000000000000000 > usbc max 0.0000000000000000 > usb avg 0.0000000000000000 > axhm time 458 0.0000000000000000 0.0000000000000000 > advc time 40 0.0000000000000000 0.0000000000000000 > vdss time 622 0.0000000000000000 0.0000000000000000 > vdss min 0.0000000000000000 > vdss max 0.0000000000000000 > vdss avg 0.0000000000000000 > dsum time 2139 0.0000000000000000 0.0000000000000000 > dsum min 0.0000000000000000 > dsum max 0.0000000000000000 > dsum avg 0.0000000000000000 > dadd time 0 0.0000000000000000 0.0000000000000000 > ddsl time 565 0.0000000000000000 0.0000000000000000 > solv time 565 0.0000000000000000 0.0000000000000000 > prep time 20 0.0000000000000000 0.0000000000000000 > > # nid tusbc tdadd tcrsl tvdss tdsum tgop > qqq F > 0 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 > 0.0000E+00 qqq > 1 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 > 0.0000E+00 qqq > 2 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 > 0.0000E+00 qqq > 3 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 > 0.0000E+00 qqq > 4 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 > 0.0000E+00 qqq > 5 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 > 0.0000E+00 qqq > > call exitt: dying ... > > backtrace(): obtained 5 stack frames. > ./nek5000(print_stack_+0x1a) [0x4fa15a] > ./nek5000(exitt_+0x1a6) [0x5e6b56] > ./nek5000(main+0x39) [0x419489] > /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x2b7993c6076d] > ./nek5000() [0x4194b9] > > total elapsed time : 0.00000E+00 sec > total solver time incl. I/O : 0.00000E+00 sec > time/timestep : 0.00000E+00 sec > CPU seconds/timestep/gridpt : 0.00000E+00 sec > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 4 22:19:52 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 4 Sep 2014 22:19:52 -0500 Subject: [Nek5000-users] Outpost question In-Reply-To: References: Message-ID: Hi JC, Sorry it took me awhile to get to this. For .fld files: In prepost.f, subroutine outfld(prefix), around line 333 (right before the call to file2 - If you reset nopen(iprefix), you should start writing to a file ending with 01 and incrementing from there. Something like: if(nopen(iprefix).gt.25) nopen(iprefix)=1 Note that nopen is a common variable and resetting this in prepost will carry over elsewhere in the code, essentially setting the number of open files to 1. If you want to preserve the open file count, just save the original nopen(iprefix) in a temp variable and restore it after the call to open the file. (~lines 344) For 0.f00000 files you can reset the variable nfld in prepost.f, subroutine mfo_open_files() before the "call mbyte_open(fname,fid0,ierr)" on line ~1703 Let me know if that doesn't work ok. Katherine On Sun, Aug 31, 2014 at 1:17 PM, wrote: > Hi Katherine, > > I was wondering if you had time to check on the parameter to be reset so > that I can overwrite previous files? > > Bonne soir?e, > JC > > > 2014-08-15 16:57 GMT+02:00 : > > Hi Katherine, >> >> Thanks for the answer. I knew about the parameter 15 and was not sure >> about the 64 bits precision. This is now more clear. >> Regarding the overwriting, I had guessed that prepost has a parameter >> that needs to be reset, but I haven't been able to figure out which one so >> far. That would be very helpful if you can take a quick look at it. >> >> Thanks a lot and enjoy the end of the summer >> ++ >> >> JC >> >> >> 2014-08-15 16:53 GMT+02:00 : >> >>> Hi JC, >>> >>> You should be able to control the outpost frequency and precision using >>> the parameters parameter 15 (IOSTEP) and parameter 63, respectively. >>> >>> So, if you wanted the first 100 steps to output every step, you would >>> set something like: >>> >>> if(istep.le.100) param(15)=1 >>> >>> To set the precision to 64bit, set param(63)=8, as well. Setting >>> param(63) to anything else should default it to 8 byte precision. >>> >>> As far as overwriting previous fld files, you should be able to reset a >>> parameter used in prepost.f that increments the file counter. I haven't >>> had a chance to test this, but I can take a look at it last this weekend. >>> >>> hth. >>> Katherine >>> >>> >>> On Fri, Aug 15, 2014 at 3:34 AM, >>> wrote: >>> >>>> Howdy Nek's, >>>> >>>> I have a couple questions regarding the ouput of files: >>>> >>>> 1. How can force, within the code (say in usrchk), some files to be >>>> output in 64 bits for high-accuracy checkpointing and other in regular 8 >>>> bits for simple visualisation? >>>> 2. Say, during the first 1000 iterations, the code outpost a file >>>> every single iteration so that I have blah0.f00001 to blah0.f01000. How can >>>> I then force the code to outpost my new files (from istep = 1001 to 2000 >>>> say) rewriting on blah0.f00001 to blah0.f01000? >>>> >>>> Thanks a lot. >>>> Regards, >>>> >>>> JC >>>> >>>> -- >>>> Jean-Christophe Loiseau >>>> Homepage >>>> >>>> _______________________________________________ >>>> 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 >>> >>> >> >> >> -- >> Jean-Christophe Loiseau >> Homepage >> >> _______________________________________________ >> Nek5000-users mailing list >> Nek5000-users at lists.mcs.anl.gov >> https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users >> >> > > > -- > Jean-Christophe Loiseau > Homepage > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Tue Sep 9 08:27:44 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 9 Sep 2014 18:57:44 +0530 Subject: [Nek5000-users] Saving perturbation solution Message-ID: Hello neks I am running the perturbation code by modifying the os7000 example. The code runs. But if I try to save the perturbation solution like this ifxyo = .false. if(istep.eq.0)then ifxyo = .true. call out_pert() else if(mod(istep,iostep).eq.0)then call out_pert() endif then I get the crash 1 U-PRES gmres: 25 3.8311E-12 5.0000E-12 1.6258E-08 3.7787E-03 1.1255E-02 filt amp 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0500 filt trn 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.9500 2.000000E-03 1 1.78124472E-03 1.78124472E-03 1.00000713E+00 1.00000686E+00 2.63413513E-07 3.83894325E-02 egn Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation. Backtrace for this error: #0 0x10fa6770d #1 0x10fa67c1b #2 0x7fff872745a9 #3 0x1042ad8fe #4 0x1042aeafb #5 0x1044e705c Thanks praveen -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Tue Sep 9 14:28:40 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 9 Sep 2014 19:28:40 +0000 Subject: [Nek5000-users] solving a helmholtz problem Message-ID: Dear Neks, I want to solve the following Helmholtz problem: (A- c* B) f = g with functions f and g equal zero at the boundary c -- given positive real constant g -- given input field A -- mass matrix B -- discrete Laplacian How do I have to set up the .rea file to solve such a problem with nek. Thanks, Joerg. From nek5000-users at lists.mcs.anl.gov Tue Sep 9 23:26:41 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 10 Sep 2014 09:56:41 +0530 Subject: [Nek5000-users] Magnetoconvection setup In-Reply-To: References: Message-ID: Hi, Any updates regarding magneto-convection setup? thanks, Supriyo Paul with best wishes and regards, Supriyo Paul *********************************************************** *Dr. Supriyo Paul* CFD/CAE Centre for Development of Advanced Computing (C-DAC) Pune University Campus, Ganeshkhind, Pune - 411007 INDIA Phone:+91-202-570-4175 Mobile:+91-860-596-5538 On 4 August 2014 16:45, wrote: > Dear NEK developers, > > We are trying to set up a magneto-convection case with NEK. Can you kindly > give us pointers on how to do that? > > Also we would like to know the form of equations that are implemented in > case of magneto-convection. > > with best wishes and regards, > Supriyo Paul > > *********************************************************** > *Dr. Supriyo Paul* > CFD/CAE > Centre for Development of Advanced Computing (C-DAC) > Pune University Campus, > Ganeshkhind, > Pune - 411007 > INDIA > > Phone:+91-202-570-4175 > Mobile:+91-860-596-5538 > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Wed Sep 10 06:08:05 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 10 Sep 2014 21:08:05 +1000 Subject: [Nek5000-users] Parallel issue: Inflow conditions from external files Message-ID: Hi all, I have a question on how to read in information from external files as an inflow boundary condition when running in parallel. Similar problem to this: http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html My geometry is a simple 3D rectangle prism with the inlet on the Y-Z plane @ x=0. I have developed some code that reads in a 2D plane of velocity data from another simulation (in this case fluent) as the boundary condition in userbc(). I am happy to share the process and the code (Fortran input/output from NEK, and MATLAB to do interpolation) however here I am primarily focused on getting it working in parallel. The process works fine in serial - it reads in 3 files (01.dat, 02.dat, 03.dat) that hold the x,y,z velocity (respectively) for each node on the inlet. However it does not work correctly when running in parallel - looking at the results after a few iterations shows that the velocities are being mapped to nodes that are not all on the inlet. It does compile and run though. I'd sincerely appreciate any the help in making it work. Warm regards, Tom I have included my .usr file below. C----------------------------- ------------------------------------------ C nek5000 user-file template C C user specified routines: C - userbc : boundary conditions C - useric : initial conditions C - uservp : variable properties C - userf : local acceleration term for fluid C - userq : local source term for scalars C - userchk: general purpose routine for checking errors etc. C C----------------------------------------------------------------------- subroutine uservp(ix,iy,iz,eg) ! set variable properties include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) udiff = 0.0 utrans = 0.0 return end c----------------------------------------------------------------------- subroutine userf(ix,iy,iz,eg) ! set acceleration term c c Note: this is an acceleration term, NOT a force! c Thus, ffx will subsequently be multiplied by rho(x,t). c include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg ffx=0 ffy=0 ffz=0 return end c----------------------------------------------------------------------- subroutine userq(ix,iy,iz,eg) ! set source term include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,f,eg c e = gllel(eg) qvol = 0.0 source = 0.0 return end c----------------------------------------------------------------------- subroutine userbc(ix,iy,iz,iside,eg) ! set up boundary conditions c NOTE: This routine may or may not be called by every processor include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,eg,ix,iy,iz,NELY,NELZ,egs common /myinlet/ Arrangedu(ly1,lz1,lelt), > Arrangedv(ly1,lz1,lelt), > Arrangedw(ly1,lz1,lelt) e = gllel(eg) ux = Arrangedu(iy,iz,eg) uy = Arrangedv(iy,iz,eg) uz = Arrangedw(iy,iz,eg) temp = 0.0 return end c----------------------------------------------------------------------- subroutine useric(ix,iy,iz,eg) ! set up initial conditions include 'SIZE' include 'TOTAL' include 'NEKUSE' integer e,eg ux = 7.235 uy = 0.0 uz = 0.0 temp = 0.0 return end c----------------------------------------------------------------------- subroutine userchk() include 'SIZE' include 'TOTAL' return end c----------------------------------------------------------------------- subroutine usrdat() ! This routine to modify element vertices include 'SIZE' include 'TOTAL' return end c----------------------------------------------------------------------- subroutine usrdat2() ! This routine to modify mesh coordinates include 'SIZE' include 'TOTAL' common /myinlet/ Arrangedu(ly1,lz1,lelt), > Arrangedv(ly1,lz1,lelt), > Arrangedw(ly1,lz1,lelt) call read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read in inlet data for BCs return end c----------------------------------------------------------------------- subroutine usrdat3() include 'SIZE' include 'TOTAL' return end C------------------------------------------------------------------------------- subroutine read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read in the inlet data include 'SIZE' include 'TOTAL' Integer Max_Nodes, Lun_Dat Parameter( Max_Nodes = 200000, Lun_Dat = 3) real Var_1( Max_Nodes,lx1), Var_2( Max_Nodes), Var_3( Max_Nodes) real Var_4( Max_Nodes), Var_5( Max_Nodes), Var_6( Max_Nodes) real Arrangedu(ly1,lz1,lelt) real Arrangedv(ly1,lz1,lelt) real Arrangedw(ly1,lz1,lelt) integer i_row( Max_Nodes), i_eg( Max_Nodes), i_y( Max_Nodes) real junk integer i, j, k, l, m, n, imin, imax, N_Nodes,ze, iyz, egs,egz integer fcount Character Line* 72 Character Directory* 57 Parameter( Directory= > '/home/tom/NEK/meshControl/MultiBox/MultiBox_10/NewInlet4/') c 1234567890123456789012345678901234567890123456789012345678 Character Filename* 4 Parameter( Filename= '.dat') c 12345 character(2) fc C +-----------+ C | Execution | C +-----------+ 1 format( 1x, a) do fcount=1,3 !for each file 01=u;02=v;03=w. 37 format (I2.2) write (fc,37) fcount ! converting integer to string print *,'Readining file #: ',fc open( unit = Lun_Dat, status = 'old', form='formatted', err = 2, > file = Directory//trim(fc)//Filename) go to 3 2 write( 6, 1) 'Error Opening file - EXIT' 3 read( Lun_Dat, 1) Line N_Nodes = 0 do i = 1, Max_Nodes read( Lun_Dat, 11, end=5) i_row(i), i_eg(i), i_y(i), > Var_1(i,1), Var_1(i,2), Var_1(i,3), > Var_1(i,4), Var_1(i,5), Var_1(i,6), > Var_1(i,7), Var_1(i,8), Var_1(i,9) 11 format( i6, 1x, i5, 1x, i4, 9( 1x, 1P E16.9)) N_Nodes = N_Nodes + 1 if( fcount .EQ. 1) THEN iyz=i_y(i) egz=i_eg(i) do ze=1,lx1 Arrangedu(iyz,ze,egz)= Var_1(i,ze) end do else if( fcount .EQ. 2) THEN iyz=i_y(i) egz=i_eg(i) do ze=1,lx1 Arrangedv(iyz,ze,egz)= Var_1(i,ze) end do else if( fcount .EQ. 3) THEN iyz=i_y(i) egz=i_eg(i) do ze=1,lx1 Arrangedw(iyz,ze,egz)= Var_1(i,ze) end do end if end do write( 6, 1) ' ' write( 6, 1) ' WARNING - Max nodes exceeeded' write( 6, 1) ' ' 5 write( 6, 6) N_Nodes 6 format( ' Number of nodes read = ', I8) end do end C------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Wed Sep 10 22:38:04 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 10 Sep 2014 23:38:04 -0400 Subject: [Nek5000-users] Postx question Message-ID: Hi, Neks I output my file with f00000 format and the number of my file is more than 10000. However I cannot open the file f10000 with postx. The error message is as below: opening file: 15 g10cond0.f0**** this is param(66): 6.0000000 WARNING: Could not open file. g10cond0.f0**** Unable to open dump number: 10000 Mu Xu -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 18 12:01:25 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 18 Sep 2014 13:01:25 -0400 Subject: [Nek5000-users] Nek5000 for Paraview Message-ID: Hello, what should I change in the *.rea file so that Nek5000 outputs the result in a file format readable by Paraview? Thanks. Pradeep -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 18 12:05:49 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 18 Sep 2014 13:05:49 -0400 Subject: [Nek5000-users] Nek5000 for Paraview In-Reply-To: References: Message-ID: FYI, right now I am using Paraview 4.1 and presently the output of my Nek5000 is in the *.fld format with files named as "case_name.fld01, case_name.fld02, case_name.fld03 etc.." On Thu, Sep 18, 2014 at 1:01 PM, Pradeep Jha wrote: > Hello, > > what should I change in the *.rea file so that Nek5000 outputs the result > in a file format readable by Paraview? > > Thanks. > Pradeep > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 18 20:23:58 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 19 Sep 2014 09:23:58 +0800 (GMT+08:00) Subject: [Nek5000-users] Nek5000 for Paraview In-Reply-To: References: Message-ID: Hi, Latest version of Paraview 4 does support Nek5000 results Enjoy. Zhenyu -----????----- ???: nek5000-users at lists.mcs.anl.gov ????: 2014-09-19 01:05:49 (???) ???: Nek5000 ??: ??: Re: [Nek5000-users] Nek5000 for Paraview FYI, right now I am using Paraview 4.1 and presently the output of my Nek5000 is in the *.fld format with files named as "case_name.fld01, case_name.fld02, case_name.fld03 etc.." On Thu, Sep 18, 2014 at 1:01 PM, Pradeep Jha wrote: Hello, what should I change in the *.rea file so that Nek5000 outputs the result in a file format readable by Paraview? Thanks. Pradeep -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Fri Sep 19 12:30:59 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 19 Sep 2014 17:30:59 +0000 Subject: [Nek5000-users] SYM boundary conditions in MHD? Message-ID: Hi, to my knowledge, the boundary conditions must be the same for the magnetic field and for the velocity field. My question is: Is it possible to use the SYM boundary conditions for both fields using the stress formulation (non-Cartesian mesh)? Many thanks, Benjamin. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Tue Sep 23 10:12:50 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 23 Sep 2014 17:12:50 +0200 Subject: [Nek5000-users] Nek5000+MOAB Message-ID: Hi NEKs, I am trying to use the MOAB enabled version of NEK. I looked at the pipe example in /examples/moab and it works. Than I recreated the .cub mesh using the journal file "pipe.jou" and Trelis. I converted the mesh using mbconvert blah.cub blah.h5m and it worked, even if there was a worrysome warning message " Element ids are not contiguous!". This is the mbsize result of the original input.h5m mesh: type count total minimum average rms maximum std.dev. ------- ------ ------- ----------------------- ----------------------- ----------------------- ----------------------- ----------------------- Edge 4952 5.1e+02 0.034623 0.10396 0.11844 0.19893 0.056762 Quad 2476 20 0.0017335 0.0082427 0.0086523 0.036989 0.0026306 Hex 5496 4.7 0.00014971 0.00085585 0.0023197 0.018287 0.0021561 1D Side 75856 7.8e+03 0.019193 0.1028 0.13066 0.50001 0.08065 Vertex 49005 an this is the same result for the new mesh: type count total minimum average rms maximum std.dev. ------- ------ ------- ----------------------- ----------------------- ----------------------- ----------------------- ----------------------- Edge 4952 5.1e+02 0.034623 0.10396 0.11844 0.19886 0.056762 Quad 2476 20 0.0017335 0.0082427 0.0086523 0.036969 0.0026306 Hex 5496 4.7 0.00014972 0.00085585 0.0023244 0.018468 0.0021611 1D Side 75856 8.3e+03 0.019195 0.11 0.14682 0.5 0.097238 Vertex 49005 If i try to use the new mesh in NEK I observe the following error: read .rea file ABORT: nelv is invalid in nekmoab_proc_map nelv, lelv = 0 5496 Probably it is more a MOAB related problem, but if anybody can give me any hints it will be great. Bests, Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Wed Sep 24 08:01:05 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 24 Sep 2014 15:01:05 +0200 Subject: [Nek5000-users] 2D to 3D Message-ID: Hi Nek's Following this post: http://lists.mcs.anl.gov/pipermail/nek5000-users/2013-October/002333.html I'm trying to extrude a 2D file to a 3D file. First, I've run a 2D case. Then I've used n2to3 to generate the new 3D .rea file, called: new3d.rea. I've launch a new simulation with new3d.rea and everything works fine. However, when I include the information about the 3D extrusion in the usrdat2 subroutine, I get the following error message if I try to run the code. It seems something related to the z_average_transpose subroutine. What is wrong? Thanks call usrdat done :: usrdat generate geometry data vol_t,vol_v: 1749.7930352474154 1749.7930352474154 done :: generate geometry data call usrdat2 ===================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = EXIT CODE: 8 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES ===================================================================================== APPLICATION TERMINATED WITH THE EXIT STRING: Floating point exception (signal 8) SL From nek5000-users at lists.mcs.anl.gov Wed Sep 24 08:07:55 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 24 Sep 2014 13:07:55 +0000 Subject: [Nek5000-users] 2D to 3D In-Reply-To: References: Message-ID: Dear SL, It depends on what is in the user file and specifically in your user dat2 subroutine (given that that appears to be the point of failure from the information in your email). Did you upgrade this routine to reflect the fact that your simulation is 3D ? 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, September 24, 2014 8:01 AM To: Nek5000 Users Subject: [Nek5000-users] 2D to 3D Hi Nek's Following this post: http://lists.mcs.anl.gov/pipermail/nek5000-users/2013-October/002333.html I'm trying to extrude a 2D file to a 3D file. First, I've run a 2D case. Then I've used n2to3 to generate the new 3D .rea file, called: new3d.rea. I've launch a new simulation with new3d.rea and everything works fine. However, when I include the information about the 3D extrusion in the usrdat2 subroutine, I get the following error message if I try to run the code. It seems something related to the z_average_transpose subroutine. What is wrong? Thanks call usrdat done :: usrdat generate geometry data vol_t,vol_v: 1749.7930352474154 1749.7930352474154 done :: generate geometry data call usrdat2 ===================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = EXIT CODE: 8 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES ===================================================================================== APPLICATION TERMINATED WITH THE EXIT STRING: Floating point exception (signal 8) SL _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Wed Sep 24 09:59:48 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Wed, 24 Sep 2014 16:59:48 +0200 Subject: [Nek5000-users] 2D to 3D In-Reply-To: References: Message-ID: Dear Paul, Thank you for your fast response. In the userdat2 subroutine I've included the same that it was written in the post: parameter (l2d=lx1*ly1*lelx) ! Number of points in 2D field common /mystuff/ u2d(l2d),v2d(l2d) nelx=lelx nely=lely nelz=lelz if (nid.eq.0) then open(33,file='file2D.dat') do i=1,l2d read(33,*) u2d(i),v2d(i) enddo close(33) endif nbytes = 8*l2d call bcast(u2d,nbytes) call bcast(v2d,nbytes) call z_average_transpose(vx,u2d) ! distribute u2d to each plane vx call z_average_transpose(vy,v2d) call outpost(vx,vy,vz,pr,t,' ') call exitti('Quit in usrdat2.$',nelgt) In the SIZE file I've set lelx=number of elements in 2D file. I've observed that the code crushes due to the z_average_transpose subroutine... What's the problem? I've also tried to read the 2D data file defining the variables in the same way that the z_average_transpose subroutine. The code didn't crush, but the results were wrong... real u2d(nx1,ny1,lelx,lely),v2d(nx1,ny1,lelx,lely) if (nid.eq.0) then open(33,file='file2D.dat') do e=1,nelt eg = lglel(e) call get_exyz(ex,ey,ez,eg,nelx,nely,nelz) do j=1,ny1 do i=1,nx1 do k=1,nz1 read(33,*) u2d(i,j,ex,ey), v2d(i,j,ex,ey) enddo enddo enddo enddo close(33) end if Thank you for your help. SL El 24-09-2014 15:07, nek5000-users at lists.mcs.anl.gov escribi?: > Dear SL, > > It depends on what is in the user file and specifically in your user > dat2 subroutine > (given that that appears to be the point of failure from the > information in your email). > > Did you upgrade this routine to reflect the fact that your simulation > is 3D ? > > 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, September 24, 2014 8:01 AM > To: Nek5000 Users > Subject: [Nek5000-users] 2D to 3D > > Hi Nek's > > > Following this post: > > http://lists.mcs.anl.gov/pipermail/nek5000-users/2013-October/002333.html > > I'm trying to extrude a 2D file to a 3D file. > > First, I've run a 2D case. Then I've used n2to3 to generate the new 3D > .rea file, called: new3d.rea. I've launch a new simulation with > new3d.rea and everything works fine. However, when I include the > information about the 3D extrusion in the usrdat2 subroutine, I get the > following error message if I try to run the code. It seems something > related to the z_average_transpose subroutine. What is wrong? Thanks > > > call usrdat > done :: usrdat > > generate geometry data > vol_t,vol_v: 1749.7930352474154 1749.7930352474154 > done :: generate geometry data > > call usrdat2 > > ===================================================================================== > = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES > = EXIT CODE: 8 > = CLEANING UP REMAINING PROCESSES > = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES > ===================================================================================== > APPLICATION TERMINATED WITH THE EXIT STRING: Floating point exception > (signal 8) > > > > SL > _______________________________________________ > 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 From nek5000-users at lists.mcs.anl.gov Thu Sep 25 04:56:26 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 25 Sep 2014 11:56:26 +0200 Subject: [Nek5000-users] Nek5000+MOAB Message-ID: Just an update. The problem was related to MOAB which is not able to read the latest .cub of Trelis. I exported the mesh in Exodus II format and then I convert it with MOAB and everything is working now. Here comes another issue. I noticed that I can use only the PnPn formulation, but I would like to use the perturbation mode. At first glance (looking at drive1.f) it seems that the perturbation mode is available only on PnPn-2 formulation. Am I wrong? Thanks, Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 25 07:25:18 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 25 Sep 2014 12:25:18 +0000 Subject: [Nek5000-users] Nek5000+MOAB In-Reply-To: References: Message-ID: Hi Adrea, Thanks for your note on the work-around with Exodus. Yes, you are right that perturbation mode is not yet available in Pn-Pn but you could dump the .rea file from Pn-Pn Nek-MOAB setup (say with lx1=3) by call gen_rea(2) or call gen_re2(2) and then proceed with Pn-2 - Pn-2 with Nek only. Let me know if you have any questions. Aleks ________________________________ 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: Thursday, September 25, 2014 4:56 AM To: nek5000-users at lists.mcs.anl.gov Subject: Re: [Nek5000-users] Nek5000+MOAB Just an update. The problem was related to MOAB which is not able to read the latest .cub of Trelis. I exported the mesh in Exodus II format and then I convert it with MOAB and everything is working now. Here comes another issue. I noticed that I can use only the PnPn formulation, but I would like to use the perturbation mode. At first glance (looking at drive1.f) it seems that the perturbation mode is available only on PnPn-2 formulation. Am I wrong? Thanks, Andrea -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 25 08:18:25 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 25 Sep 2014 08:18:25 -0500 Subject: [Nek5000-users] Nek5000+MOAB In-Reply-To: References: Message-ID: Andrea, thanks for reporting the issue about the cub file version incompatibility. Can you give details on the version of Trelis and cub file format (13.x, 14.x ?) used here ? Just a note for the future: it would be good to email moab-dev about any issues like these since most of the MOAB devs aren't subscribed to NEK mailing lists. Vijay On Thu, Sep 25, 2014 at 4:56 AM, wrote: > Just an update. > > The problem was related to MOAB which is not able to read the latest .cub of > Trelis. I exported the mesh in Exodus II format and then I convert it with > MOAB and everything is working now. > > > Here comes another issue. I noticed that I can use only the PnPn > formulation, but I would like to use the perturbation mode. At first glance > (looking at drive1.f) it seems that the perturbation mode is available only > on PnPn-2 formulation. Am I wrong? > > Thanks, > > Andrea > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > From nek5000-users at lists.mcs.anl.gov Thu Sep 25 11:41:11 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 25 Sep 2014 18:41:11 +0200 Subject: [Nek5000-users] error reading .fld ascii file Message-ID: Hi Neks, I'm trying to restar an ascii *.fld02 file, but I get the following error message: set initial conditions Checking restart options: start.fl02 nekuic (1) for ifld 1 Reading checkpoint data 0 0 OPEN: start.fl02 byte swap: T 1.35684711E-19 6.40740794E-10 17872 5 5 5 1.530191500E-03 2 X Y Z U NELT,NX,NY,N 0.000 0.000 0.000 0.0 NONSTD HDR, parse_hdr, abort. ERROR: Error reading restart header in mfi_prepare ierr= 1 I set param(67)=0. in the .rea file and also in userchk subroutine. What is wrong? I saved the file using param(66)=0. and I didn't change anything... Thank you in advance SL From nek5000-users at lists.mcs.anl.gov Thu Sep 25 14:05:26 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Thu, 25 Sep 2014 21:05:26 +0200 Subject: [Nek5000-users] Nek5000+MOAB Message-ID: >Andrea, thanks for reporting the issue about the cub file version >incompatibility. Can you give details on the version of Trelis and cub >file format (13.x, 14.x ?) used here ? Trelis version is 15.03 ( I just downloaded the trial version a couple of days ago). I don't know the version of the cubit file format, how I can inquire? >Just a note for the future: it would be good to email moab-dev about >any issues like these since most of the MOAB devs aren't subscribed to >NEK mailing lists. Ok, I will keep in mind for the future. Initially I was not sure that it was a problem of MOAB. Indeed mbconvert was working without any warnings. It is just that inside the mesh all the information linked to geometrical entities are lost. For instance, if I define a sideset with a surface is lost, if it is defined with the mesh elements it was keeped. >Vijay On Thu, Sep 25, 2014 at 4:56 AM, > wrote: >* Just an update. *>>* The problem was related to MOAB which is not able to read the latest .cub of *>* Trelis. I exported the mesh in Exodus II format and then I convert it with *>* MOAB and everything is working now. *>>>* Here comes another issue. I noticed that I can use only the PnPn *>* formulation, but I would like to use the perturbation mode. At first glance *>* (looking at drive1.f) it seems that the perturbation mode is available only *>* on PnPn-2 formulation. Am I wrong? *>>* Thanks, *>>* Andrea *>>* _____* -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Thu Sep 25 23:06:17 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 26 Sep 2014 09:36:17 +0530 Subject: [Nek5000-users] Saving perturbation solution In-Reply-To: References: Message-ID: Dear neks I am still stuck with the problem of not being able to save the perturbation solution using out_pert(). Do you have any suggestions ? Thanks praveen On Tue, Sep 9, 2014 at 6:57 PM, wrote: > Hello neks > > I am running the perturbation code by modifying the os7000 example. The > code runs. But if I try to save the perturbation solution like this > > ifxyo = .false. > > if(istep.eq.0)then > > ifxyo = .true. > > call out_pert() > > else if(mod(istep,iostep).eq.0)then > > call out_pert() > > endif > > > then I get the crash > > 1 U-PRES gmres: 25 3.8311E-12 5.0000E-12 1.6258E-08 > 3.7787E-03 1.1255E-02 > > filt amp 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 > 0.0000 0.0000 0.0000 0.0000 0.0500 > > filt trn 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 > 1.0000 1.0000 1.0000 1.0000 0.9500 > > 2.000000E-03 1 1.78124472E-03 1.78124472E-03 1.00000713E+00 > 1.00000686E+00 2.63413513E-07 3.83894325E-02 egn > > > Program received signal SIGFPE: Floating-point exception - erroneous > arithmetic operation. > > > Backtrace for this error: > > #0 0x10fa6770d > > #1 0x10fa67c1b > > #2 0x7fff872745a9 > > #3 0x1042ad8fe > > #4 0x1042aeafb > > #5 0x1044e705c > > > Thanks > > praveen > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Fri Sep 26 02:14:01 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 26 Sep 2014 09:14:01 +0200 Subject: [Nek5000-users] Nek5000+MOAB Message-ID: Hi Aleks, thanks a lot. It works perfectly. Andrea >Hi Adrea, >Thanks for your note on the work-around with Exodus. >Yes, you are right that perturbation mode is not yet available in Pn-Pn but you could dump the .rea file from Pn-Pn Nek-MOAB setup (say with lx1=3) by > call gen_rea(2) >or > call gen_re2(2) > and then proceed with Pn-2 - Pn-2 with Nek only. >Let me know if you have any questions. >Aleks -------------- next part -------------- An HTML attachment was scrubbed... URL: From nek5000-users at lists.mcs.anl.gov Fri Sep 26 05:52:06 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 26 Sep 2014 12:52:06 +0200 Subject: [Nek5000-users] Parallel issue: Inflow conditions from external files In-Reply-To: References: Message-ID: Hi, Did you manage to solve the problem? I also have the same problem... I am able to read velocity data and to set them as initial condition in serial, but in parallel it is not working... The velocity is mapped to nodes that are not the proper ones... What is wrong? Thanks! SL El 10-09-2014 13:08, nek5000-users at lists.mcs.anl.gov escribi?: > Hi all, > > I have a question on how to read in information from external files as > an inflow boundary condition when running in parallel. > > Similar problem to this: > http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html > [1] > > My geometry is a simple 3D rectangle prism with the inlet on the Y-Z > plane @ x=0. > > I have developed some code that reads in a 2D plane of velocity data > from another simulation (in this case fluent) as the boundary > condition in userbc(). I am happy to share the process and the code > (Fortran input/output from NEK, and MATLAB to do interpolation) > however here I am primarily focused on getting it working in parallel. > > The process works fine in serial - it reads in 3 files (01.dat, > 02.dat, 03.dat) that hold the x,y,z velocity (respectively) for each > node on the inlet. > > However it does not work correctly when running in parallel - looking > at the results after a few iterations shows that the velocities are > being mapped to nodes that are not all on the inlet. It does compile > and run though. > > I'd sincerely appreciate any the help in making it work. > > Warm regards, > > Tom > > I have included my .usr file below. > > C----------------------------- > ------------------------------------------ > C? nek5000 user-file template > C > C? user specified routines: > C???? - userbc : boundary conditions > C???? - useric : initial conditions > C???? - uservp : variable properties > C???? - userf? : local acceleration term for fluid > C???? - userq? : local source term for scalars > C???? - userchk: general purpose routine for checking errors etc. > C > C----------------------------------------------------------------------- > ????? subroutine uservp(ix,iy,iz,eg) ! set variable properties > ????? include 'SIZE' > ????? include 'TOTAL' > ????? include 'NEKUSE' > > ????? integer e,f,eg > c???? e = gllel(eg) > > ????? udiff? = 0.0 > ????? utrans = 0.0 > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine userf(ix,iy,iz,eg) ! set acceleration term > c > c???? Note: this is an acceleration term, NOT a force! > c???? Thus, ffx will subsequently be multiplied by rho(x,t). > c > ????? include 'SIZE' > ????? include 'TOTAL' > ????? include 'NEKUSE' > > ????? integer e,f,eg > > ????? ffx=0 > ????? ffy=0 > ????? ffz=0 > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine userq(ix,iy,iz,eg) ! set source term > ????? include 'SIZE' > ????? include 'TOTAL' > ????? include 'NEKUSE' > > ????? integer e,f,eg > c???? e = gllel(eg) > > ????? qvol?? = 0.0 > ????? source = 0.0 > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine userbc(ix,iy,iz,iside,eg) ! set up boundary > conditions > > c???? NOTE: This routine may or may not be called by every > processor > > ????? include 'SIZE' > ????? include 'TOTAL' > ????? include 'NEKUSE' > ????? integer e,eg,ix,iy,iz,NELY,NELZ,egs > > ????? common /myinlet/ Arrangedu(ly1,lz1,lelt), > ???? >???????????????? Arrangedv(ly1,lz1,lelt), > ???? >???????????????? Arrangedw(ly1,lz1,lelt) > > ????? e? = gllel(eg) > ????? ux?? = Arrangedu(iy,iz,eg) > ????? uy?? = Arrangedv(iy,iz,eg) > ????? uz?? = Arrangedw(iy,iz,eg) > ????? temp = 0.0 > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine useric(ix,iy,iz,eg) ! set up initial conditions > ????? include 'SIZE' > ????? include 'TOTAL' > ????? include 'NEKUSE' > ????? integer e,eg > > ????? ux?? = 7.235 > ????? uy?? = 0.0 > ????? uz?? = 0.0 > ????? temp = 0.0 > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine userchk() > ????? include 'SIZE' > ????? include 'TOTAL' > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine usrdat()?? ! This routine to modify element > vertices > ????? include 'SIZE' > ????? include 'TOTAL' > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine usrdat2()? ! This routine to modify mesh > coordinates > ????? include 'SIZE' > ????? include 'TOTAL' > > ????? common /myinlet/ Arrangedu(ly1,lz1,lelt), > ???? >???????????????? Arrangedv(ly1,lz1,lelt), > ???? >???????????????? Arrangedw(ly1,lz1,lelt) > > ????? call read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read in > inlet data for BCs > > ????? return > ????? end > c----------------------------------------------------------------------- > ????? subroutine usrdat3() > ????? include 'SIZE' > ????? include 'TOTAL' > > ????? return > ????? end > C------------------------------------------------------------------------------- > ????? subroutine read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read > in the inlet data > > ????? include 'SIZE' > ????? include 'TOTAL' > > ????? Integer??? Max_Nodes,????????? Lun_Dat > ????? Parameter( Max_Nodes = 200000, Lun_Dat = 3) > > ????? real Var_1( Max_Nodes,lx1), Var_2( Max_Nodes), Var_3( > Max_Nodes) > ????? real Var_4( Max_Nodes), Var_5( Max_Nodes), Var_6( > Max_Nodes) > ????? real Arrangedu(ly1,lz1,lelt) > ????? real Arrangedv(ly1,lz1,lelt) > ????? real Arrangedw(ly1,lz1,lelt) > > ????? integer i_row( Max_Nodes), i_eg( Max_Nodes), i_y( > Max_Nodes) > > ????? real junk > > ????? integer i, j, k, l, m, n, imin, imax, N_Nodes,ze, iyz, > egs,egz > ????? integer fcount > > ????? Character Line* 72 > > ????? Character? Directory* 57 > ????? Parameter( Directory= > ???? >?? > '/home/tom/NEK/meshControl/MultiBox/MultiBox_10/NewInlet4/') > c???????? > 1234567890123456789012345678901234567890123456789012345678 > > ????? Character? Filename* 4 > ????? Parameter( Filename= '.dat') > c?????????????????????????? 12345 > ????? character(2) fc > > C???? +-----------+ > C???? | Execution | > C???? +-----------+ > > 1?????? format( 1x, a) > > ????? do fcount=1,3 !for each file 01=u;02=v;03=w. > > 37??? format (I2.2) > ????? write (fc,37) fcount ! converting integer to string > ????? print *,'Readining file #: ',fc > > ????? open( unit = Lun_Dat, status = 'old', form='formatted', err > = 2, > ???? >????? file = Directory//trim(fc)//Filename) > ????? go to 3 > 2???? write( 6, 1) 'Error Opening file - EXIT' > > 3???? read( Lun_Dat, 1)? Line > > ????? N_Nodes = 0 > ????? do i = 1, Max_Nodes > ???????? read( Lun_Dat, 11, end=5) i_row(i),? i_eg(i),? > i_y(i), > ???? >????????????????????? Var_1(i,1), > Var_1(i,2), Var_1(i,3), > ???? >????????????????????? Var_1(i,4), > Var_1(i,5), Var_1(i,6), > ???? >????????????????????? Var_1(i,7), > Var_1(i,8), Var_1(i,9) > 11?????? format( i6, 1x, i5, 1x, i4, 9( 1x, 1P E16.9)) > ???????? N_Nodes = N_Nodes + 1 > ???????? > ?????? if( fcount .EQ. 1) THEN > ???????? iyz=i_y(i) > ???????? egz=i_eg(i) > ???????? do ze=1,lx1 > ???????? Arrangedu(iyz,ze,egz)= Var_1(i,ze) > ???????? end do > ?????? else if( fcount .EQ. 2) THEN > ???????? iyz=i_y(i) > ???????? egz=i_eg(i) > ???????? do ze=1,lx1 > ???????? Arrangedv(iyz,ze,egz)= Var_1(i,ze) > ???????? end do > ????? else if( fcount .EQ. 3) THEN > ???????? iyz=i_y(i) > ???????? egz=i_eg(i) > ???????? do ze=1,lx1 > ???????? Arrangedw(iyz,ze,egz)= Var_1(i,ze) > ???????? end do > ????? end if > > ????? end do > ????? write( 6, 1) ' ' > ????? write( 6, 1) ' WARNING - Max nodes exceeeded' > ????? write( 6, 1) ' ' > 5???? write( 6, 6) N_Nodes > 6???? format( ' Number of nodes read = ', I8) > > ????? end do > > ????? end > C------------------------------------------------------------------------------- > > Links: > ------ > [1] > http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html > > _______________________________________________ > Nek5000-users mailing list > Nek5000-users at lists.mcs.anl.gov > https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Sat Sep 27 08:31:01 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Sat, 27 Sep 2014 13:31:01 +0000 Subject: [Nek5000-users] Parallel issue: Inflow conditions from external files In-Reply-To: References: , Message-ID: Dear All, You need to understand something about distributed memory parallel computing to be able to read files. My suggestion would be to write your file into the .fld or f0000 format and restart from that, since Nek provides a parallel read. Otherwise, you have to think carefully about the reading process, whether you have enough memory per node for a since process to read the file, whether it will take so long that you need parallel I/O, etc. There is not a one-size-fits all solution (save for the above suggestion) because for small files it's possible to write something in 10 minutes whereas for large files much more sophistication is required in order to meet the time and memory constraints. If you want to read a small file, you would do something like: common /scrns/ u(lx1,ly1,lz1,lelg),work(lx1,ly1,lz1,lelg) if (istep.eq.0) then nxyz = nx1*ny1*nz1 n = nelgv*nxyz call rzero(u,n) ! zero-out u on all processors if (nid.eq.0) then read(44,*) (u(k),k=1,n) endif call gop(u,work,'+ ',n) ! add result across all processors do e=1,nelv eg = lglel(e) call copy(vx(1,1,1,e),u(1,1,1,eg),nxyz) enddo ...The danger here is that it is slow (because it is serial) and that you run out memory because you are allocating memory that is the size of the entire problem (i.e., not size-of-problem divided by P, the number of processors). For small processor counts it might be ok.... depending on how big the simulation etc. If you take this approach, however, it will not scale when you start running serious simulations. 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: Friday, September 26, 2014 5:52 AM To: nek5000-users at lists.mcs.anl.gov Subject: Re: [Nek5000-users] Parallel issue: Inflow conditions from external files Hi, Did you manage to solve the problem? I also have the same problem... I am able to read velocity data and to set them as initial condition in serial, but in parallel it is not working... The velocity is mapped to nodes that are not the proper ones... What is wrong? Thanks! SL El 10-09-2014 13:08, nek5000-users at lists.mcs.anl.gov escribi?: > Hi all, > > I have a question on how to read in information from external files as > an inflow boundary condition when running in parallel. > > Similar problem to this: > http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html > [1] > > My geometry is a simple 3D rectangle prism with the inlet on the Y-Z > plane @ x=0. > > I have developed some code that reads in a 2D plane of velocity data > from another simulation (in this case fluent) as the boundary > condition in userbc(). I am happy to share the process and the code > (Fortran input/output from NEK, and MATLAB to do interpolation) > however here I am primarily focused on getting it working in parallel. > > The process works fine in serial - it reads in 3 files (01.dat, > 02.dat, 03.dat) that hold the x,y,z velocity (respectively) for each > node on the inlet. > > However it does not work correctly when running in parallel - looking > at the results after a few iterations shows that the velocities are > being mapped to nodes that are not all on the inlet. It does compile > and run though. > > I'd sincerely appreciate any the help in making it work. > > Warm regards, > > Tom > > I have included my .usr file below. > > C----------------------------- > ------------------------------------------ > C nek5000 user-file template > C > C user specified routines: > C - userbc : boundary conditions > C - useric : initial conditions > C - uservp : variable properties > C - userf : local acceleration term for fluid > C - userq : local source term for scalars > C - userchk: general purpose routine for checking errors etc. > C > C----------------------------------------------------------------------- > subroutine uservp(ix,iy,iz,eg) ! set variable properties > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > > integer e,f,eg > c e = gllel(eg) > > udiff = 0.0 > utrans = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine userf(ix,iy,iz,eg) ! set acceleration term > c > c Note: this is an acceleration term, NOT a force! > c Thus, ffx will subsequently be multiplied by rho(x,t). > c > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > > integer e,f,eg > > ffx=0 > ffy=0 > ffz=0 > > return > end > c----------------------------------------------------------------------- > subroutine userq(ix,iy,iz,eg) ! set source term > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > > integer e,f,eg > c e = gllel(eg) > > qvol = 0.0 > source = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine userbc(ix,iy,iz,iside,eg) ! set up boundary > conditions > > c NOTE: This routine may or may not be called by every > processor > > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,eg,ix,iy,iz,NELY,NELZ,egs > > common /myinlet/ Arrangedu(ly1,lz1,lelt), > >???????????????? Arrangedv(ly1,lz1,lelt), > >???????????????? Arrangedw(ly1,lz1,lelt) > > e = gllel(eg) > ux = Arrangedu(iy,iz,eg) > uy = Arrangedv(iy,iz,eg) > uz = Arrangedw(iy,iz,eg) > temp = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine useric(ix,iy,iz,eg) ! set up initial conditions > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,eg > > ux = 7.235 > uy = 0.0 > uz = 0.0 > temp = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine userchk() > include 'SIZE' > include 'TOTAL' > > return > end > c----------------------------------------------------------------------- > subroutine usrdat() ! This routine to modify element > vertices > include 'SIZE' > include 'TOTAL' > > return > end > c----------------------------------------------------------------------- > subroutine usrdat2() ! This routine to modify mesh > coordinates > include 'SIZE' > include 'TOTAL' > > common /myinlet/ Arrangedu(ly1,lz1,lelt), > >???????????????? Arrangedv(ly1,lz1,lelt), > >???????????????? Arrangedw(ly1,lz1,lelt) > > call read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read in > inlet data for BCs > > return > end > c----------------------------------------------------------------------- > subroutine usrdat3() > include 'SIZE' > include 'TOTAL' > > return > end > C------------------------------------------------------------------------------- > subroutine read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read > in the inlet data > > include 'SIZE' > include 'TOTAL' > > Integer Max_Nodes, Lun_Dat > Parameter( Max_Nodes = 200000, Lun_Dat = 3) > > real Var_1( Max_Nodes,lx1), Var_2( Max_Nodes), Var_3( > Max_Nodes) > real Var_4( Max_Nodes), Var_5( Max_Nodes), Var_6( > Max_Nodes) > real Arrangedu(ly1,lz1,lelt) > real Arrangedv(ly1,lz1,lelt) > real Arrangedw(ly1,lz1,lelt) > > integer i_row( Max_Nodes), i_eg( Max_Nodes), i_y( > Max_Nodes) > > real junk > > integer i, j, k, l, m, n, imin, imax, N_Nodes,ze, iyz, > egs,egz > integer fcount > > Character Line* 72 > > Character Directory* 57 > Parameter( Directory= > >?? > '/home/tom/NEK/meshControl/MultiBox/MultiBox_10/NewInlet4/') > c > 1234567890123456789012345678901234567890123456789012345678 > > Character Filename* 4 > Parameter( Filename= '.dat') > c 12345 > character(2) fc > > C +-----------+ > C | Execution | > C +-----------+ > > 1 format( 1x, a) > > do fcount=1,3 !for each file 01=u;02=v;03=w. > > 37 format (I2.2) > write (fc,37) fcount ! converting integer to string > print *,'Readining file #: ',fc > > open( unit = Lun_Dat, status = 'old', form='formatted', err > = 2, > >????? file = Directory//trim(fc)//Filename) > go to 3 > 2 write( 6, 1) 'Error Opening file - EXIT' > > 3 read( Lun_Dat, 1) Line > > N_Nodes = 0 > do i = 1, Max_Nodes > read( Lun_Dat, 11, end=5) i_row(i), i_eg(i), > i_y(i), > >????????????????????? Var_1(i,1), > Var_1(i,2), Var_1(i,3), > >????????????????????? Var_1(i,4), > Var_1(i,5), Var_1(i,6), > >????????????????????? Var_1(i,7), > Var_1(i,8), Var_1(i,9) > 11 format( i6, 1x, i5, 1x, i4, 9( 1x, 1P E16.9)) > N_Nodes = N_Nodes + 1 > > if( fcount .EQ. 1) THEN > iyz=i_y(i) > egz=i_eg(i) > do ze=1,lx1 > Arrangedu(iyz,ze,egz)= Var_1(i,ze) > end do > else if( fcount .EQ. 2) THEN > iyz=i_y(i) > egz=i_eg(i) > do ze=1,lx1 > Arrangedv(iyz,ze,egz)= Var_1(i,ze) > end do > else if( fcount .EQ. 3) THEN > iyz=i_y(i) > egz=i_eg(i) > do ze=1,lx1 > Arrangedw(iyz,ze,egz)= Var_1(i,ze) > end do > end if > > end do > write( 6, 1) ' ' > write( 6, 1) ' WARNING - Max nodes exceeeded' > write( 6, 1) ' ' > 5 write( 6, 6) N_Nodes > 6 format( ' Number of nodes read = ', I8) > > end do > > end > C------------------------------------------------------------------------------- > > Links: > ------ > [1] > http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html > > _______________________________________________ > 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 From nek5000-users at lists.mcs.anl.gov Sat Sep 27 09:21:36 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Sat, 27 Sep 2014 14:21:36 +0000 Subject: [Nek5000-users] Parallel issue: Inflow conditions from external files In-Reply-To: References: , , Message-ID: OK... regarding my suggestion about .f0000 .fld, it's actually not the correct approach for BCs (which I now see was the original request)... Sorry about that! The code snippet still holds, but again, some sophistication is required because you really need to understand which elements are to receive boundary conditions, etc. Even in serial, this is a nontrivial issue because the approach would vary from one mesh to the next. But hopefully the code I sent will point you in the right direction concerning the parallel apporach. Best, 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: Saturday, September 27, 2014 8:31 AM To: nek5000-users at lists.mcs.anl.gov Subject: Re: [Nek5000-users] Parallel issue: Inflow conditions from external files Dear All, You need to understand something about distributed memory parallel computing to be able to read files. My suggestion would be to write your file into the .fld or f0000 format and restart from that, since Nek provides a parallel read. Otherwise, you have to think carefully about the reading process, whether you have enough memory per node for a since process to read the file, whether it will take so long that you need parallel I/O, etc. There is not a one-size-fits all solution (save for the above suggestion) because for small files it's possible to write something in 10 minutes whereas for large files much more sophistication is required in order to meet the time and memory constraints. If you want to read a small file, you would do something like: common /scrns/ u(lx1,ly1,lz1,lelg),work(lx1,ly1,lz1,lelg) if (istep.eq.0) then nxyz = nx1*ny1*nz1 n = nelgv*nxyz call rzero(u,n) ! zero-out u on all processors if (nid.eq.0) then read(44,*) (u(k),k=1,n) endif call gop(u,work,'+ ',n) ! add result across all processors do e=1,nelv eg = lglel(e) call copy(vx(1,1,1,e),u(1,1,1,eg),nxyz) enddo ...The danger here is that it is slow (because it is serial) and that you run out memory because you are allocating memory that is the size of the entire problem (i.e., not size-of-problem divided by P, the number of processors). For small processor counts it might be ok.... depending on how big the simulation etc. If you take this approach, however, it will not scale when you start running serious simulations. 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: Friday, September 26, 2014 5:52 AM To: nek5000-users at lists.mcs.anl.gov Subject: Re: [Nek5000-users] Parallel issue: Inflow conditions from external files Hi, Did you manage to solve the problem? I also have the same problem... I am able to read velocity data and to set them as initial condition in serial, but in parallel it is not working... The velocity is mapped to nodes that are not the proper ones... What is wrong? Thanks! SL El 10-09-2014 13:08, nek5000-users at lists.mcs.anl.gov escribi?: > Hi all, > > I have a question on how to read in information from external files as > an inflow boundary condition when running in parallel. > > Similar problem to this: > http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html > [1] > > My geometry is a simple 3D rectangle prism with the inlet on the Y-Z > plane @ x=0. > > I have developed some code that reads in a 2D plane of velocity data > from another simulation (in this case fluent) as the boundary > condition in userbc(). I am happy to share the process and the code > (Fortran input/output from NEK, and MATLAB to do interpolation) > however here I am primarily focused on getting it working in parallel. > > The process works fine in serial - it reads in 3 files (01.dat, > 02.dat, 03.dat) that hold the x,y,z velocity (respectively) for each > node on the inlet. > > However it does not work correctly when running in parallel - looking > at the results after a few iterations shows that the velocities are > being mapped to nodes that are not all on the inlet. It does compile > and run though. > > I'd sincerely appreciate any the help in making it work. > > Warm regards, > > Tom > > I have included my .usr file below. > > C----------------------------- > ------------------------------------------ > C nek5000 user-file template > C > C user specified routines: > C - userbc : boundary conditions > C - useric : initial conditions > C - uservp : variable properties > C - userf : local acceleration term for fluid > C - userq : local source term for scalars > C - userchk: general purpose routine for checking errors etc. > C > C----------------------------------------------------------------------- > subroutine uservp(ix,iy,iz,eg) ! set variable properties > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > > integer e,f,eg > c e = gllel(eg) > > udiff = 0.0 > utrans = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine userf(ix,iy,iz,eg) ! set acceleration term > c > c Note: this is an acceleration term, NOT a force! > c Thus, ffx will subsequently be multiplied by rho(x,t). > c > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > > integer e,f,eg > > ffx=0 > ffy=0 > ffz=0 > > return > end > c----------------------------------------------------------------------- > subroutine userq(ix,iy,iz,eg) ! set source term > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > > integer e,f,eg > c e = gllel(eg) > > qvol = 0.0 > source = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine userbc(ix,iy,iz,iside,eg) ! set up boundary > conditions > > c NOTE: This routine may or may not be called by every > processor > > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,eg,ix,iy,iz,NELY,NELZ,egs > > common /myinlet/ Arrangedu(ly1,lz1,lelt), > >???????????????? Arrangedv(ly1,lz1,lelt), > >???????????????? Arrangedw(ly1,lz1,lelt) > > e = gllel(eg) > ux = Arrangedu(iy,iz,eg) > uy = Arrangedv(iy,iz,eg) > uz = Arrangedw(iy,iz,eg) > temp = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine useric(ix,iy,iz,eg) ! set up initial conditions > include 'SIZE' > include 'TOTAL' > include 'NEKUSE' > integer e,eg > > ux = 7.235 > uy = 0.0 > uz = 0.0 > temp = 0.0 > > return > end > c----------------------------------------------------------------------- > subroutine userchk() > include 'SIZE' > include 'TOTAL' > > return > end > c----------------------------------------------------------------------- > subroutine usrdat() ! This routine to modify element > vertices > include 'SIZE' > include 'TOTAL' > > return > end > c----------------------------------------------------------------------- > subroutine usrdat2() ! This routine to modify mesh > coordinates > include 'SIZE' > include 'TOTAL' > > common /myinlet/ Arrangedu(ly1,lz1,lelt), > >???????????????? Arrangedv(ly1,lz1,lelt), > >???????????????? Arrangedw(ly1,lz1,lelt) > > call read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read in > inlet data for BCs > > return > end > c----------------------------------------------------------------------- > subroutine usrdat3() > include 'SIZE' > include 'TOTAL' > > return > end > C------------------------------------------------------------------------------- > subroutine read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read > in the inlet data > > include 'SIZE' > include 'TOTAL' > > Integer Max_Nodes, Lun_Dat > Parameter( Max_Nodes = 200000, Lun_Dat = 3) > > real Var_1( Max_Nodes,lx1), Var_2( Max_Nodes), Var_3( > Max_Nodes) > real Var_4( Max_Nodes), Var_5( Max_Nodes), Var_6( > Max_Nodes) > real Arrangedu(ly1,lz1,lelt) > real Arrangedv(ly1,lz1,lelt) > real Arrangedw(ly1,lz1,lelt) > > integer i_row( Max_Nodes), i_eg( Max_Nodes), i_y( > Max_Nodes) > > real junk > > integer i, j, k, l, m, n, imin, imax, N_Nodes,ze, iyz, > egs,egz > integer fcount > > Character Line* 72 > > Character Directory* 57 > Parameter( Directory= > >?? > '/home/tom/NEK/meshControl/MultiBox/MultiBox_10/NewInlet4/') > c > 1234567890123456789012345678901234567890123456789012345678 > > Character Filename* 4 > Parameter( Filename= '.dat') > c 12345 > character(2) fc > > C +-----------+ > C | Execution | > C +-----------+ > > 1 format( 1x, a) > > do fcount=1,3 !for each file 01=u;02=v;03=w. > > 37 format (I2.2) > write (fc,37) fcount ! converting integer to string > print *,'Readining file #: ',fc > > open( unit = Lun_Dat, status = 'old', form='formatted', err > = 2, > >????? file = Directory//trim(fc)//Filename) > go to 3 > 2 write( 6, 1) 'Error Opening file - EXIT' > > 3 read( Lun_Dat, 1) Line > > N_Nodes = 0 > do i = 1, Max_Nodes > read( Lun_Dat, 11, end=5) i_row(i), i_eg(i), > i_y(i), > >????????????????????? Var_1(i,1), > Var_1(i,2), Var_1(i,3), > >????????????????????? Var_1(i,4), > Var_1(i,5), Var_1(i,6), > >????????????????????? Var_1(i,7), > Var_1(i,8), Var_1(i,9) > 11 format( i6, 1x, i5, 1x, i4, 9( 1x, 1P E16.9)) > N_Nodes = N_Nodes + 1 > > if( fcount .EQ. 1) THEN > iyz=i_y(i) > egz=i_eg(i) > do ze=1,lx1 > Arrangedu(iyz,ze,egz)= Var_1(i,ze) > end do > else if( fcount .EQ. 2) THEN > iyz=i_y(i) > egz=i_eg(i) > do ze=1,lx1 > Arrangedv(iyz,ze,egz)= Var_1(i,ze) > end do > else if( fcount .EQ. 3) THEN > iyz=i_y(i) > egz=i_eg(i) > do ze=1,lx1 > Arrangedw(iyz,ze,egz)= Var_1(i,ze) > end do > end if > > end do > write( 6, 1) ' ' > write( 6, 1) ' WARNING - Max nodes exceeeded' > write( 6, 1) ' ' > 5 write( 6, 6) N_Nodes > 6 format( ' Number of nodes read = ', I8) > > end do > > end > C------------------------------------------------------------------------------- > > Links: > ------ > [1] > http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html > > _______________________________________________ > 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 _______________________________________________ Nek5000-users mailing list Nek5000-users at lists.mcs.anl.gov https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users From nek5000-users at lists.mcs.anl.gov Tue Sep 30 06:38:23 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Tue, 30 Sep 2014 13:38:23 +0200 Subject: [Nek5000-users] Parallel issue: Inflow conditions from external files In-Reply-To: References: , , Message-ID: Thank you Paul. It works! About your first proposal, I've saved the file in ascii .fld format, but I cannot restart my simulation if the file is not .f0000. I've set param(67)=0, but it seems not to recognize the header. It should work, shouldn't it? Or is there anything that I'm missing in the restart options, if I work in parallel...? Best SL El 27-09-2014 16:21, nek5000-users at lists.mcs.anl.gov escribi?: > OK... regarding my suggestion about .f0000 .fld, it's actually not the > correct approach > for BCs (which I now see was the original request)... Sorry about that! > > The code snippet still holds, but again, some sophistication is > required because you > really need to understand which elements are to receive boundary > conditions, etc. > Even in serial, this is a nontrivial issue because the approach would > vary from one > mesh to the next. But hopefully the code I sent will point you in the > right direction > concerning the parallel apporach. > > Best, 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: Saturday, September 27, 2014 8:31 AM > To: nek5000-users at lists.mcs.anl.gov > Subject: Re: [Nek5000-users] Parallel issue: Inflow conditions from > external files > > Dear All, > > You need to understand something about distributed memory parallel > computing to > be able to read files. > > My suggestion would be to write your file into the .fld or f0000 > format and restart from that, > since Nek provides a parallel read. > > Otherwise, you have to think carefully about the reading process, > whether you have > enough memory per node for a since process to read the file, whether > it will take so > long that you need parallel I/O, etc. There is not a one-size-fits > all solution (save for > the above suggestion) because for small files it's possible to write > something in 10 minutes > whereas for large files much more sophistication is required in order > to meet the > time and memory constraints. > > If you want to read a small file, you would do something like: > > common /scrns/ u(lx1,ly1,lz1,lelg),work(lx1,ly1,lz1,lelg) > > if (istep.eq.0) then > > nxyz = nx1*ny1*nz1 > n = nelgv*nxyz > > call rzero(u,n) ! zero-out u on all processors > > if (nid.eq.0) then > read(44,*) (u(k),k=1,n) > endif > > call gop(u,work,'+ ',n) ! add result across all processors > > do e=1,nelv > eg = lglel(e) > call copy(vx(1,1,1,e),u(1,1,1,eg),nxyz) > enddo > > ...The danger here is that it is slow (because it is serial) and that > you run out memory because you are allocating memory that is > the size of the entire problem (i.e., not size-of-problem divided by P, > the number of processors). > > For small processor counts it might be ok.... depending on how > big the simulation etc. > > If you take this approach, however, it will not scale when you start > running > serious simulations. > > 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: Friday, September 26, 2014 5:52 AM > To: nek5000-users at lists.mcs.anl.gov > Subject: Re: [Nek5000-users] Parallel issue: Inflow conditions from > external files > > Hi, > > Did you manage to solve the problem? I also have the same problem... I > am able to read velocity data and to set them as initial condition in > serial, but in parallel it is not working... The velocity is mapped to > nodes that are not the proper ones... > > What is wrong? > > Thanks! > SL > > > El 10-09-2014 13:08, nek5000-users at lists.mcs.anl.gov escribi?: >> Hi all, >> >> I have a question on how to read in information from external files as >> an inflow boundary condition when running in parallel. >> >> Similar problem to this: >> http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html >> [1] >> >> My geometry is a simple 3D rectangle prism with the inlet on the Y-Z >> plane @ x=0. >> >> I have developed some code that reads in a 2D plane of velocity data >> from another simulation (in this case fluent) as the boundary >> condition in userbc(). I am happy to share the process and the code >> (Fortran input/output from NEK, and MATLAB to do interpolation) >> however here I am primarily focused on getting it working in parallel. >> >> The process works fine in serial - it reads in 3 files (01.dat, >> 02.dat, 03.dat) that hold the x,y,z velocity (respectively) for each >> node on the inlet. >> >> However it does not work correctly when running in parallel - looking >> at the results after a few iterations shows that the velocities are >> being mapped to nodes that are not all on the inlet. It does compile >> and run though. >> >> I'd sincerely appreciate any the help in making it work. >> >> Warm regards, >> >> Tom >> >> I have included my .usr file below. >> >> C----------------------------- >> ------------------------------------------ >> C nek5000 user-file template >> C >> C user specified routines: >> C - userbc : boundary conditions >> C - useric : initial conditions >> C - uservp : variable properties >> C - userf : local acceleration term for fluid >> C - userq : local source term for scalars >> C - userchk: general purpose routine for checking errors etc. >> C >> C----------------------------------------------------------------------- >> subroutine uservp(ix,iy,iz,eg) ! set variable properties >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> >> integer e,f,eg >> c e = gllel(eg) >> >> udiff = 0.0 >> utrans = 0.0 >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine userf(ix,iy,iz,eg) ! set acceleration term >> c >> c Note: this is an acceleration term, NOT a force! >> c Thus, ffx will subsequently be multiplied by rho(x,t). >> c >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> >> integer e,f,eg >> >> ffx=0 >> ffy=0 >> ffz=0 >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine userq(ix,iy,iz,eg) ! set source term >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> >> integer e,f,eg >> c e = gllel(eg) >> >> qvol = 0.0 >> source = 0.0 >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine userbc(ix,iy,iz,iside,eg) ! set up boundary >> conditions >> >> c NOTE: This routine may or may not be called by every >> processor >> >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> integer e,eg,ix,iy,iz,NELY,NELZ,egs >> >> common /myinlet/ Arrangedu(ly1,lz1,lelt), >> >???????????????? Arrangedv(ly1,lz1,lelt), >> >???????????????? Arrangedw(ly1,lz1,lelt) >> >> e = gllel(eg) >> ux = Arrangedu(iy,iz,eg) >> uy = Arrangedv(iy,iz,eg) >> uz = Arrangedw(iy,iz,eg) >> temp = 0.0 >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine useric(ix,iy,iz,eg) ! set up initial conditions >> include 'SIZE' >> include 'TOTAL' >> include 'NEKUSE' >> integer e,eg >> >> ux = 7.235 >> uy = 0.0 >> uz = 0.0 >> temp = 0.0 >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine userchk() >> include 'SIZE' >> include 'TOTAL' >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine usrdat() ! This routine to modify element >> vertices >> include 'SIZE' >> include 'TOTAL' >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine usrdat2() ! This routine to modify mesh >> coordinates >> include 'SIZE' >> include 'TOTAL' >> >> common /myinlet/ Arrangedu(ly1,lz1,lelt), >> >???????????????? Arrangedv(ly1,lz1,lelt), >> >???????????????? Arrangedw(ly1,lz1,lelt) >> >> call read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read in >> inlet data for BCs >> >> return >> end >> c----------------------------------------------------------------------- >> subroutine usrdat3() >> include 'SIZE' >> include 'TOTAL' >> >> return >> end >> C------------------------------------------------------------------------------- >> subroutine read_inlet(Arrangedu,Arrangedv,Arrangedw) ! Read >> in the inlet data >> >> include 'SIZE' >> include 'TOTAL' >> >> Integer Max_Nodes, Lun_Dat >> Parameter( Max_Nodes = 200000, Lun_Dat = 3) >> >> real Var_1( Max_Nodes,lx1), Var_2( Max_Nodes), Var_3( >> Max_Nodes) >> real Var_4( Max_Nodes), Var_5( Max_Nodes), Var_6( >> Max_Nodes) >> real Arrangedu(ly1,lz1,lelt) >> real Arrangedv(ly1,lz1,lelt) >> real Arrangedw(ly1,lz1,lelt) >> >> integer i_row( Max_Nodes), i_eg( Max_Nodes), i_y( >> Max_Nodes) >> >> real junk >> >> integer i, j, k, l, m, n, imin, imax, N_Nodes,ze, iyz, >> egs,egz >> integer fcount >> >> Character Line* 72 >> >> Character Directory* 57 >> Parameter( Directory= >> >?? >> '/home/tom/NEK/meshControl/MultiBox/MultiBox_10/NewInlet4/') >> c >> 1234567890123456789012345678901234567890123456789012345678 >> >> Character Filename* 4 >> Parameter( Filename= '.dat') >> c 12345 >> character(2) fc >> >> C +-----------+ >> C | Execution | >> C +-----------+ >> >> 1 format( 1x, a) >> >> do fcount=1,3 !for each file 01=u;02=v;03=w. >> >> 37 format (I2.2) >> write (fc,37) fcount ! converting integer to string >> print *,'Readining file #: ',fc >> >> open( unit = Lun_Dat, status = 'old', form='formatted', err >> = 2, >> >????? file = Directory//trim(fc)//Filename) >> go to 3 >> 2 write( 6, 1) 'Error Opening file - EXIT' >> >> 3 read( Lun_Dat, 1) Line >> >> N_Nodes = 0 >> do i = 1, Max_Nodes >> read( Lun_Dat, 11, end=5) i_row(i), i_eg(i), >> i_y(i), >> >????????????????????? Var_1(i,1), >> Var_1(i,2), Var_1(i,3), >> >????????????????????? Var_1(i,4), >> Var_1(i,5), Var_1(i,6), >> >????????????????????? Var_1(i,7), >> Var_1(i,8), Var_1(i,9) >> 11 format( i6, 1x, i5, 1x, i4, 9( 1x, 1P E16.9)) >> N_Nodes = N_Nodes + 1 >> >> if( fcount .EQ. 1) THEN >> iyz=i_y(i) >> egz=i_eg(i) >> do ze=1,lx1 >> Arrangedu(iyz,ze,egz)= Var_1(i,ze) >> end do >> else if( fcount .EQ. 2) THEN >> iyz=i_y(i) >> egz=i_eg(i) >> do ze=1,lx1 >> Arrangedv(iyz,ze,egz)= Var_1(i,ze) >> end do >> else if( fcount .EQ. 3) THEN >> iyz=i_y(i) >> egz=i_eg(i) >> do ze=1,lx1 >> Arrangedw(iyz,ze,egz)= Var_1(i,ze) >> end do >> end if >> >> end do >> write( 6, 1) ' ' >> write( 6, 1) ' WARNING - Max nodes exceeeded' >> write( 6, 1) ' ' >> 5 write( 6, 6) N_Nodes >> 6 format( ' Number of nodes read = ', I8) >> >> end do >> >> end >> C------------------------------------------------------------------------------- >> >> Links: >> ------ >> [1] >> http://lists.mcs.anl.gov/pipermail/nek5000-users/2010-December/001151.html >> >> _______________________________________________ >> 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 > _______________________________________________ > 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 From nek5000-users at lists.mcs.anl.gov Thu Sep 25 16:48:52 2014 From: nek5000-users at lists.mcs.anl.gov (nek5000-users at lists.mcs.anl.gov) Date: Fri, 26 Sep 2014 01:48:52 +0400 Subject: [Nek5000-users] interpolation of results to uniform grid Message-ID: In a 2D flow simulation I would like to make manually some spectral analysis on spacial fields of temperature, velocity etc. Spacial field must be on a regular uniform rectangular mesh. Schematically I need a procedure like T=getfield('foo0.f00009'), where T is in the matrix form, f.e. for 3 point in one dimension and 2 in the other: T11 T12 T13 T21 T22 T23 In tools there is an interpolation tool int_tp that could solve the problem. But to get it work you have to supply .box files. The problem is complicated with the fact that though the geometry is quadrilateral, it is not rectangular and nonuniform. I have created it in prex. There you have "Multi-SPLIT" in menu which refines the opposite sides of quadrilateral the same way, just what I needed (first I divided the whole domain to four parts by quadsplit and after I refine each part nonuniformly to make it more dense towards the boundary). Finally I have trapezuim domain in which mesh is refined towards each of the four boundaries. You can see the picture following the link. https://www.dropbox.com/s/7sb2njt6ju2qo1b/mesh24x24.png?dl=0 I would be happy to interpolate this mesh to "uniform" (the sides are meshed uniformly) and get it in matrix form. But in terms of .box files I don't know how to set the quadrilateral geometry. So is there a way to create this type of geometry scriptwize? I saw in mailing list that there a utility sem2lex. But I could not find it. As a temporary solution I think about hpts.in. Though there will be 10^4 points in hpts.out for each time. Thank you, Ilias -------------- next part -------------- An HTML attachment was scrubbed... URL: