diff --git a/.gitlab/merge_request_templates/Release.md b/.gitlab/merge_request_templates/Release.md index bc95ff947..113261c87 100644 --- a/.gitlab/merge_request_templates/Release.md +++ b/.gitlab/merge_request_templates/Release.md @@ -1,6 +1,6 @@ # Merge Request To-Do -* [ ] Update of version number in piclas.f90 and globals_vars.f90 +* [ ] Update of version number in ./src/piclaslib.f90 and ./src/globals/globals_vars.f90 * [ ] Release notes ## Regression Testing @@ -31,4 +31,4 @@ ### Fixes -* \ No newline at end of file +* diff --git a/doc/developerguide/010_git_workflow.md b/doc/developerguide/010_git_workflow.md index 6261a2d78..4828b6d91 100644 --- a/doc/developerguide/010_git_workflow.md +++ b/doc/developerguide/010_git_workflow.md @@ -39,15 +39,15 @@ For this purpose, the developer can select the respective template for his merge ## Release and deploy -For a release, a merge of the master.dev branch into the master branch is required. This merge request should be associated with a milestone (e.g. Release 1.X.X). For this specific merge request, the template `Release` can be chosen, which contains the to-do list as well as the template for the release notes as given below. After the successful completion of all to-do's and regression checks (check-in, nightly, weekly), the master.dev branch can be merged into the master. +A new release version of PICLas is created from the **master** repository, which requires a merge of the current **master.dev** branch into the **master** branch. The corresponding merge request should be associated with a release milestone (e.g. *Release 1.X.X* within which the merge request is referenced, e.g., "See merge request !283"). Within this specific merge request, the template `Release` is chosen, which contains the to-do list as well as the template for the release notes as given below. After the successful completion of all to-do's and regression checks (check-in, nightly, weekly), the **master.dev** branch can be merged into the **master** branch. ### Release Tag -A release can be created through the web interface ([Repository -> Tags](https://gitlab.com/piclas/piclas/tags) -> New tag), as the `Tag name` the new version should be used +A new release tag can be created through the web interface ([Repository -> Tags](https://gitlab.com/piclas/piclas/tags) -> New tag) and as the `Tag name`, the new version number is used, e.g., v1.X.X -The tag should be created from the `master` branch and the `Message` left empty. The release notes, which were compiled within the corresponding milestone, shall be given in the following format +The tag is then created from the **master** branch repository and the `Message` is left empty. The release notes, which were used within the corresponding milestone, shall be given in the following format ## Release 1.X.X diff --git a/doc/developerguide/040_reggie.md b/doc/developerguide/040_reggie.md index 0dd03bc0f..24ecac955 100644 --- a/doc/developerguide/040_reggie.md +++ b/doc/developerguide/040_reggie.md @@ -188,6 +188,13 @@ Latest test: on ubuntu (18.04), 3 Jul 2019 ``` sudo chown -R gitlab-runner:gitlab-runner /var/lib/gitlab-runner/.ssh/ ``` + If the runner is used to push to remote repositories, add the public key under *deploy keys* + and execute, e.g., + ``` + sudo -u gitlab-runner git clone git@github.com:piclas-framework/piclas.git piclas_github + ``` + to establish the first connection with the new repository and add the repo IP to the list of + known hosts. 6. Start pipeline in gitlab or github for testing of reggie NOTE: Interesting information is found in `/etc/systemd/system/gitlab-runner.service`. @@ -258,13 +265,19 @@ check_interval = 0 ``` ### Automatic Deployment to other platforms + 1. Add the required ssh key to the deploy keys on the respective platform (e.g. github) 1. Clone a code from the platform to update the list of known hosts. Do not forget to copy the information to the correct location for the runner to have access to the platform ``` sudo cp~/.ssh/.ssh/known_hosts /var/lib/gitlab-runner/.ssh/known_hosts ``` -1. PICLas deployment in performed by the gitlab runner in the *deployment stage* + This might have to be performed via the gitlab-runner user, which can be accomplished by + executing the following command + ``` + sudo -u gitlab-runner git clone git@github.com:piclas-framework/piclas.git piclas_github + ``` +1. PICLas deployment is performed by the gitlab runner in the *deployment stage* ``` github: stage: deploy diff --git a/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 b/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 index af300e91a..120ca83ac 100644 Binary files a/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 and b/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 differ diff --git a/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/parameter.ini b/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/parameter.ini index 017f6e45e..ecfea6285 100644 --- a/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/parameter.ini +++ b/regressioncheck/checks/WEK_BGKFlow/Flow_N2_70degCone/parameter.ini @@ -126,5 +126,5 @@ Particles-BGK-UseQuantVibEn=T Particles-BGK-DoVibRelaxation=T ! BGK Refinement Particles-BGK-DoCellAdaptation=T -Particles-BGK-MinPartsPerCell=50 +Particles-BGK-MinPartsPerCell=12 Particles-BGK-SplittingDens = 3.8E20 diff --git a/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 b/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 index 57843af55..79566dd20 100644 Binary files a/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 and b/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/70degCone2D_Set1_DSMCSurfState_000.00200000000000000_reference.h5 differ diff --git a/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/parameter.ini b/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/parameter.ini index 49c032eac..3e5867fd9 100644 --- a/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/parameter.ini +++ b/regressioncheck/checks/WEK_FPFlow/Flow_N2_70degCone/parameter.ini @@ -127,4 +127,4 @@ Particles-FP-DoVibRelaxation = T Particles-FP-UseQuantVibEn = T ! FP Refinement Particles-FP-DoCellAdaptation = T -Particles-FP-MinPartsPerCell = 50 +Particles-FP-MinPartsPerCell = 12 diff --git a/src/globals/globals_vars.f90 b/src/globals/globals_vars.f90 index 712189390..501737cb8 100644 --- a/src/globals/globals_vars.f90 +++ b/src/globals/globals_vars.f90 @@ -22,7 +22,7 @@ MODULE MOD_Globals_Vars ! GLOBAL VARIABLES !----------------------------------------------------------------------------------------------------------------------------------- CHARACTER(LEN=6),PARAMETER :: ProgramName = 'PICLas' !> name of this program -REAL,PARAMETER :: FileVersion = 1.5 !> FileVersion number saved in each hdf5 file with hdf5 header +REAL,PARAMETER :: FileVersion = 1.51 !> FileVersion number saved in each hdf5 file with hdf5 header REAL :: FileVersionHDF5 !> FileVersion number read from hdf5 restart file REAL :: WallTime !> Wall time needed by a simulation (is not reset by !> performing a load balance step, only by user restart) diff --git a/src/particles/bgk/bgk_adaptation.f90 b/src/particles/bgk/bgk_adaptation.f90 index 2139ca394..ed80f23c1 100644 --- a/src/particles/bgk/bgk_adaptation.f90 +++ b/src/particles/bgk/bgk_adaptation.f90 @@ -544,13 +544,13 @@ SUBROUTINE BGK_quadtree_adapt(iElem) !=================================================================================================================================== ! MODULES USE MOD_TimeDisc_Vars ,ONLY: TEnd, Time +USE MOD_DSMC_ParticlePairing ,ONLY: GeoCoordToMap2D USE MOD_DSMC_Vars ,ONLY: tTreeNode, ElemNodeVol, DSMC, RadialWeighting USE MOD_Particle_Mesh_Vars ,ONLY: GEO USE MOD_Particle_Vars ,ONLY: PEM, PartState, PartPosRef,Species,WriteMacroVolumeValues, usevMPF USE MOD_Particle_Tracking_Vars ,ONLY: DoRefMapping USE MOD_BGK_CollOperator ,ONLY: BGK_CollisionOperator USE MOD_BGK_Vars ,ONLY: BGKMinPartPerCell,BGKSplittingDens!,BGKMovingAverage,ElemNodeAveraging,BGKMovingAverageLength -USE MOD_Eval_xyz ,ONLY: GetPositionInRefElem USE MOD_FP_CollOperator ,ONLY: FP_CollisionOperator USE MOD_BGK_Vars ,ONLY: BGKInitDone,BGK_MeanRelaxFactor,BGK_MeanRelaxFactorCounter,BGK_MaxRelaxFactor USE MOD_BGK_Vars ,ONLY: BGK_QualityFacSamp, BGK_MaxRotRelaxFactor @@ -612,17 +612,13 @@ SUBROUTINE BGK_quadtree_adapt(iElem) ! The quadtree refinement is performed if either the particle number or number density is above a user-given limit IF(nPart.GE.(2.*BGKMinPartPerCell).AND.(Dens.GT.BGKSplittingDens)) THEN - ALLOCATE(TreeNode%MappedPartStates(1:3,1:nPart)) + ALLOCATE(TreeNode%MappedPartStates(1:2,1:nPart)) TreeNode%PNum_Node = nPart - IF (DoRefMapping) THEN - DO iLoop = 1, nPart - TreeNode%MappedPartStates(1:3,iLoop)=PartPosRef(1:3,TreeNode%iPartIndx_Node(iLoop)) - END DO - ELSE ! position in reference space [-1,1] has to be computed - DO iLoop = 1, nPart - CALL GetPositionInRefElem(PartState(1:3,TreeNode%iPartIndx_Node(iLoop)),TreeNode%MappedPartStates(1:3,iLoop),iElem) - END DO - END IF ! DoRefMapping + iPart = PEM%pStart(iElem) ! create particle index list for pairing + DO iLoop = 1, nPart + CALL GeoCoordToMap2D(PartState(1:2,iPart), TreeNode%MappedPartStates(1:2,iLoop), iElem) + iPart = PEM%pNext(iPart) + END DO TreeNode%NodeDepth = 1 TreeNode%MidPoint(1:3) = (/0.0,0.0,0.0/) ! Start of the recursive routine, which will descend further down the quadtree until the aforementioned criteria are fulfilled diff --git a/src/particles/bgk/bgk_colloperator.f90 b/src/particles/bgk/bgk_colloperator.f90 index 80c2c2497..c319789d6 100644 --- a/src/particles/bgk/bgk_colloperator.f90 +++ b/src/particles/bgk/bgk_colloperator.f90 @@ -86,7 +86,7 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av INTEGER :: INFO, nNotRelax, nRotRelax, nVibRelax REAL :: TRot, betaV, OldEnRot, RotExp, VibExp, NewEnRot, NewEnVib, vBulkRelaxOld(3),vBulkRelax(3) REAL :: CellTempRelax, vBulkAver(3), u2Aver, nPartAver, dtCell -REAL :: partWeight, totalWeight, totalWeightRelax +REAL :: partWeight, totalWeight, totalWeightRelax, totalWeight2 #ifdef CODE_ANALYZE REAL :: Energy_old,Energy_new,Momentum_old(3),Momentum_new(3) INTEGER :: iMom @@ -110,12 +110,13 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av u2 = 0.0; u0ij = 0.0; u0i = 0.0; u2i = 0.0 Evib = 0.0; ERot = 0.0 u2Aver = 0.0; vBulkRelax = 0.0; vBulkRelaxOld = 0.0 -totalWeight = 0.0; dtCell = 0.0; totalWeightRelax = 0.0 +totalWeight = 0.0; dtCell = 0.0; totalWeightRelax = 0.0; totalWeight2 = 0.0 ! 1.) Summing up the relative velocities and their square to calculate the moments DO iLoop = 1, nPart partWeight = GetParticleWeight(iPartIndx_Node(iLoop)) totalWeight = totalWeight + partWeight + totalWeight2 = totalWeight2 + partWeight*partWeight V_rel(1:3)=PartState(4:6,iPartIndx_Node(iLoop))-vBulkAll(1:3) IF (BGKMovingAverage) u2Aver = u2Aver + DOTPRODUCT(PartState(4:6,iPartIndx_Node(iLoop))) vmag2 = V_rel(1)**2 + V_rel(2)**2 + V_rel(3)**2 @@ -150,11 +151,12 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av u2i = u2i*nPart*nPart/((nPart-1.)*(nPart-2.)*totalWeight) END IF -u2 = u2*nPart/((nPart-1.)*totalWeight) +!u2 = u2*nPart/((nPart-1.)*totalWeight) u0ij = u0ij/totalWeight u0i(1:3) = u0i(1:3)/totalWeight trace = u0ij(1,1)+u0ij(2,2)+u0ij(3,3) -CellTemp = Species(1)%MassIC * u2 / (3.0*BoltzmannConst) +CellTemp = Species(1)%MassIC * u2 / (3.0*BoltzmannConst * (totalWeight - totalWeight2/totalWeight)) +u2 = u2 / totalWeight IF(usevMPF.OR.RadialWeighting%DoRadialWeighting) THEN ! totalWeight contains the weighted particle number @@ -290,7 +292,7 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av END IF !Rotation CALL RANDOM_NUMBER(iRan) - ProbAddPart = 1.-RotExp + ProbAddPart = (1.-RotExp) IF (ProbAddPart.GT.iRan) THEN nRotRelax = nRotRelax + 1 iPartIndx_NodeRelaxRot(nRotRelax) = iPartIndx_Node(iLoop) @@ -299,7 +301,7 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av ! Vibration IF(BGKDoVibRelaxation) THEN CALL RANDOM_NUMBER(iRan) - ProbAddPart = 1.-VibExp + ProbAddPart = (1.-VibExp) IF (ProbAddPart.GT.iRan) THEN nVibRelax = nVibRelax + 1 iPartIndx_NodeRelaxVib(nVibRelax) = iPartIndx_Node(iLoop) @@ -394,9 +396,11 @@ SUBROUTINE BGK_CollisionOperator(iPartIndx_Node, nPart, NodeVolume, vBulkAll, Av ELSE KronDelta = 0.0 END IF +! SMat(fillMa1, fillMa2)= KronDelta - (1.-Prandtl)/(2.*Prandtl) & +! *(Species(1)%MassIC/(BoltzmannConst*CellTemp)*nPart/(nPart-1.) & +! *(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta) SMat(fillMa1, fillMa2)= KronDelta - (1.-Prandtl)/(2.*Prandtl) & - *(Species(1)%MassIC/(BoltzmannConst*CellTemp)*nPart/(nPart-1.) & - *(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta) + *(3./u2*(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta) ! SMat(fillMa1, fillMa2)= KronDelta - (1.-Prandtl)/(2.*Prandtl) & ! *(Species(1)%MassIC/(BoltzmannConst*CellTemp) & ! *(u0ij(fillMa1, fillMa2)-u0i(fillMa1)*u0i(fillMa2))-KronDelta) diff --git a/src/particles/bgk/bgk_init.f90 b/src/particles/bgk/bgk_init.f90 index 573f29a9b..3fa162047 100644 --- a/src/particles/bgk/bgk_init.f90 +++ b/src/particles/bgk/bgk_init.f90 @@ -154,7 +154,7 @@ SUBROUTINE InitBGK() IF(CoupledBGKDSMC) THEN BGKDSMCSwitchDens = GETREAL('Particles-BGK-DSMC-SwitchDens') ELSE - IF(RadialWeighting%DoRadialWeighting) RadialWeighting%PerformCloning = .FALSE. + IF(RadialWeighting%DoRadialWeighting) RadialWeighting%PerformCloning = .TRUE. END IF ! Octree-based cell refinement, up to a certain number of particles DoBGKCellAdaptation = GETLOGICAL('Particles-BGK-DoCellAdaptation') diff --git a/src/piclaslib.f90 b/src/piclaslib.f90 index 8bc1ced5c..ccd77d33f 100644 --- a/src/piclaslib.f90 +++ b/src/piclaslib.f90 @@ -77,7 +77,7 @@ SUBROUTINE InitializePiclas() SWRITE(UNIT_stdOut,'(A)')" | ) ___) (___| (____/\| (____/\| ) ( |/\____) |" SWRITE(UNIT_stdOut,'(A)')" |/ \_______/(_______/(_______/|/ \|\_______)" SWRITE(UNIT_stdOut,'(132(" "))') -SWRITE(UNIT_stdOut,'(A)')"piclas version 1.5.0" +SWRITE(UNIT_stdOut,'(A)')"piclas version 1.5.1" SWRITE(UNIT_stdOut,'(132("="))') CALL ParseCommandlineArguments()