⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userd_bcond.for

📁 两维弹性边界元程序
💻 FOR
字号:
!For User to prescribe 
! BOUNDARY CONDITION
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!What User should prescribe here include:
! NLoadMax: maximum number of loading steps
! JBCU1P2(ICmp,Nod,Ele)=1 if UNod(ICmp,Nod,Ele) is given;
! JBCU1P2(ICmp,Nod,Ele)=2 if PNod(ICmp,Nod,Ele) is given.
! UNod(ICmp,Nod,Ele): displacement
! PNod(ICmp,Nod,Ele): traction
! User may prescribe nodal boundary conditions by group for convenience.
! The boundary condition may change with loading step, NLoad.
!The other information that may be used for the description of boundary condition:
! NLoad: Nth loading step
! NECap: maximum number of elements
! NtotEle: current total number of elements
! NodEle(NthE): number of nodes in the NthE element
! OEle(NthE): orientation angle of the NthE element
! NthBdEle(NthE): Nth body to which the NthE element belongs
! NthGrpEle(NthE): Nth group to which the NthE element belongs
! XNod(X1/2,NthN,NthE): nodal coordinates
! User should not change any of these quantities.
***************************************************
	Subroutine UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod) !output
	Implicit Real*8 (A-H,O-Z)
	Implicit Integer (I-N)
	Dimension NodEle(NECap),OEle(NECap)
	Dimension NthBdEle(NECap),NthGrpEle(NECap),XNod(2,3,NECap)
	Dimension JBCU1P2(2,3,NECap),UNod(2,3,NECap),PNod(2,3,NECap)
	Common/Example/NthExample
*================================================================
	If(NthExample.eq.1) then
	 Call Ex1_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod)
	 return
	elseif(NthExample.eq.2) then
	 Call Ex2_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod)
	 return
	elseif(NthExample.eq.3) then
	 Call Ex3_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod)
	 return
	elseif(NthExample.eq.4) then
	 Call Ex4_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod)
	 return
	endif
*===================================================
	NLoadMax=1
!===================================================
	Do 250 NE=1,NtotEle
	Do 250 NN=1,NodEle(NE)
	If(NthGrpEle(NE).eq.1) then
				JBCU1P2(1,NN,NE)=1
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=0.d0
			JBCU1P2(2,NN,NE)=1
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	elseif(NthGrpEle(NE).eq.3) then
				JBCU1P2(1,NN,NE)=2
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=1.d-1
			JBCU1P2(2,NN,NE)=2
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	else
				JBCU1P2(1,NN,NE)=2
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=0.d0
			JBCU1P2(2,NN,NE)=2
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	endif	 	  	  
250	continue
*================================================================
	return
	end
***************************************************
	Subroutine Ex1_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod) !output
	Implicit Real*8 (A-H,O-Z)
	Implicit Integer (I-N)
	Dimension NodEle(NECap),OEle(NECap)
	Dimension NthBdEle(NECap),NthGrpEle(NECap),XNod(2,3,NECap)
	Dimension JBCU1P2(2,3,NECap),UNod(2,3,NECap),PNod(2,3,NECap)
*===================================================
	NLoadMax=1
!===================================================
	Do 250 NE=1,NtotEle
	Do 250 NN=1,NodEle(NE)
	If(NthGrpEle(NE).eq.1) then
				JBCU1P2(1,NN,NE)=1
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=0.d0
			JBCU1P2(2,NN,NE)=1
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	elseif(NthGrpEle(NE).eq.3) then
				JBCU1P2(1,NN,NE)=2
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=1.d-1
			JBCU1P2(2,NN,NE)=2
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	else
				JBCU1P2(1,NN,NE)=2
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=0.d0
			JBCU1P2(2,NN,NE)=2
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	endif	 	  	  
250	continue
*================================================================
	return
	end
***************************************************
	Subroutine Ex2_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod) !output
	Implicit Real*8 (A-H,O-Z)
	Implicit Integer (I-N)
	Dimension NodEle(NECap),OEle(NECap)
	Dimension NthBdEle(NECap),NthGrpEle(NECap),XNod(2,3,NECap)
	Dimension JBCU1P2(2,3,NECap),UNod(2,3,NECap),PNod(2,3,NECap)
*===================================================
	NLoadMax=1
!===================================================
				JBCU1P2=2
				UNod=0.d0
				PNod=0.d0
*========================================================
	return
	end
***************************************************
	Subroutine Ex3_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod) !output
	Implicit Real*8 (A-H,O-Z)
	Implicit Integer (I-N)
	Dimension NodEle(NECap),OEle(NECap)
	Dimension NthBdEle(NECap),NthGrpEle(NECap),XNod(2,3,NECap)
	Dimension JBCU1P2(2,3,NECap),UNod(2,3,NECap),PNod(2,3,NECap)
*===================================================
	NLoadMax=1
!===================================================
	Do 250 NE=1,NtotEle
	Do 250 NN=1,NodEle(NE)
	If(
	1	NthGrpEle(NE).eq.1.or.NthGrpEle(NE).eq.2.or.
	1	NthGrpEle(NE).eq.3.or.NthGrpEle(NE).eq.5.or.
	1	NthGrpEle(NE).eq.10.or.NthGrpEle(NE).eq.11.or.
	1	NthGrpEle(NE).eq.13.or.NthGrpEle(NE).eq.14.or.
	1	NthGrpEle(NE).eq.16
     1	) then
				JBCU1P2(1,NN,NE)=1
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=0.d0
			JBCU1P2(2,NN,NE)=2
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	else
				JBCU1P2(1,NN,NE)=2
				UNod(1,NN,NE)=0.d0
				PNod(1,NN,NE)=0.d0
			JBCU1P2(2,NN,NE)=2
			UNod(2,NN,NE)=0.d0
			PNod(2,NN,NE)=0.d0
	endif	 	  	  
250	continue
*================================================================
	return
	end
***************************************************
	Subroutine Ex4_UserBCond(NLoad,NLoadMax,
	1	NECap,NtotEle,NodEle,OEle,NthBdEle,NthGrpEle,XNod,
	1	JBCU1P2,UNod,PNod) !output
	Implicit Real*8 (A-H,O-Z)
	Implicit Integer (I-N)
	Dimension NodEle(NECap),OEle(NECap)
	Dimension NthBdEle(NECap),NthGrpEle(NECap),XNod(2,3,NECap)
	Dimension JBCU1P2(2,3,NECap),UNod(2,3,NECap),PNod(2,3,NECap)
*===================================================
	NLoadMax=1
!===================================================
				JBCU1P2=2
				UNod=0.d0
				PNod=0.d0
*================================================================
	return
	end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -