CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS

Two simultaneous heat sources in ANSYS APDL

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2018, 17:40
Default Two simultaneous heat sources in ANSYS APDL
  #1
New Member
 
Fabrício
Join Date: Mar 2018
Posts: 2
Rep Power: 0
Unkinunki is on a distinguished road
Hi,
I am currently working with a transient thermal analysis for a welding process. For this model, I use Goldak’s double ellipsoid heat source, which is defined using APDL commands. Geometry, mesh and timesteps are determined in Ansys Mechanical.
In order to achieve a finger type penetration, I have to combine two heat sources. The problem is that I have not been able to combine them simultaneously. As a first trial, I have been trying to simulate two heat sources at different coordinate points. However, only one of them is applied. Does anyone know how to solve this problem?

I have attached my APDL codes and some figures to give a better understanding.

Thanks in advance.
Attached Images
File Type: jpg Results.jpg (31.3 KB, 22 views)
File Type: jpg Coordinates.jpg (27.4 KB, 22 views)
File Type: jpg Finger penetration.JPG (45.5 KB, 24 views)
Attached Files
File Type: txt Constants.txt (954 Bytes, 27 views)
File Type: txt HeatSource.txt (1.4 KB, 32 views)
Unkinunki is offline   Reply With Quote

Old   January 1, 2020, 22:04
Default use the different body
  #2
New Member
 
kipa
Join Date: Sep 2019
Posts: 1
Rep Power: 0
kipa is on a distinguished road
cut body ,one body add one source
kipa is offline   Reply With Quote

Old   February 5, 2020, 17:53
Default
  #3
New Member
 
Juan Daniel Trejos
Join Date: Feb 2020
Location: Monterrey, Mexico
Posts: 3
Rep Power: 2
Juan Daniel is on a distinguished road
Hi,
¿Do you still need help about this topic?
Juan Daniel is offline   Reply With Quote

Old   May 25, 2020, 10:05
Default Goldak's Double Ellipsoidal Heat Source
  #4
New Member
 
Shekhar S
Join Date: May 2020
Location: India
Posts: 2
Rep Power: 0
shekhars.ip.17@nitj.ac.in is on a distinguished road
Hi All,
I have been trying to model the heat source and succeded for a single bead only. For 2nd bead, the modification in the code has not worked yet.
Can you give me some lead?
shekhars.ip.17@nitj.ac.in is offline   Reply With Quote

Old   May 26, 2020, 18:04
Default
  #5
New Member
 
Juan Daniel Trejos
Join Date: Feb 2020
Location: Monterrey, Mexico
Posts: 3
Rep Power: 2
Juan Daniel is on a distinguished road
Hi, can you share your code, I like to check some errors or to give you some tips.
Juan Daniel is offline   Reply With Quote

Old   May 27, 2020, 02:56
Default Hi Juan
  #6
New Member
 
Shekhar S
Join Date: May 2020
Location: India
Posts: 2
Rep Power: 0
shekhars.ip.17@nitj.ac.in is on a distinguished road
Here is my code for two moving heat source one after one:-

C*** CONSTANTS DEFINITION

VOLT = 175 ! VOLTAGE (VOLTS)
CURR = 12.5 ! CURRENT (AMPERES)
EFF = 0.90 ! EFFICIENCY

VEL = 4E-3 ! WELDING SPEED (m/s)

Q = EFF*VOLT*CURR ! HEAT INPUT (W)

A = 5E-3 ! ELLIPSOID DIMENSIONS (m)
B = 2.5E-3
C1 = 8E-3
C2 = 10E-3

FF = 0.6 ! HEAT FRACTIONS
FR = 1.4

TAU = (C1/VEL) ! LAG FACTOR (s)
TTIME = 65 ! TOTAL TIME (s)
!!TIME_WELD = 56 ! WELDING TIME (s)
DT = 1 ! TIME INCREMENT (s)

PI = 3.14
EE = 2.718

C*** HEAT SOURCE

CMSEL,S,WELD_1 ! SELECT THE WELD COMPONENT

*GET,EMAX,ELEM,,NUM,MAX ! GET THE MAXIMUM ELEMENT NUMBER
*GET,EMIN,ELEM,,NUM,MIN ! GET THE MINIMUM ELEMENT NUMBER

ALLSEL

!!NPT = TIME_WELD/DT ! NUMBER OF LOADSTEPS 1

*DO,ii,1,28,1

WTIME = (ii/2)
TIME,WTIME

*DO,jj,EMIN,EMAX,1

CSYS,20
*GET,X,ELEM,jj,CENT,X
*GET,Y,ELEM,jj,CENT,Y
*GET,Z,ELEM,jj,CENT,Z

CSI = Y + (VEL*(TAU-WTIME))

*IF,(TAU-WTIME),GT,0,THEN

C = C1
F = FF

*ELSE

C = C2
F = FR

*ENDIF

PART1 = 6*(3**0.5)*F*Q/(A*B*C*PI*(PI**0.5))
PART2 = (EE**(-3*(X/A)**2))*(EE**(-3*(Z/B)**2))*(EE**(-3*(CSI/C)**2))
QF1 = PART1*PART2

BFE,jj,HGEN,,QF1

*ENDDO

SOLVE

*ENDDO

CMSEL,S,Substrate_1 ! SELECT THE WELD COMPONENT

*GET,EMAX,ELEM,,NUM,MAX ! GET THE MAXIMUM ELEMENT NUMBER
*GET,EMIN,ELEM,,NUM,MIN ! GET THE MINIMUM ELEMENT NUMBER

ALLSEL

*DO,uu,29,60,1

WTIME = (uu/2)
TIME,WTIME

*DO,kk,EMIN,EMAX,1

CSYS,30
*GET,X,ELEM,kk,CENT,X
*GET,Y,ELEM,kk,CENT,Y
*GET,Z,ELEM,kk,CENT,Z

CSI = Y + (VEL*(TAU-WTIME))

*IF,(TAU-WTIME),GT,0,THEN

C = C1
F = FF

*ELSE

C = C2
F = FR

*ENDIF

PART3 = 6*(3**0.5)*F*Q/(A*B*C*PI*(PI**0.5))
PART4 = (EE**(-3*(X/A)**2))*(EE**(-3*(Z/B)**2))*(EE**(-3*(CSI/C)**2))
QF2 = PART3*PART4

BFE,kk,HGEN,,QF2

*ENDDO

SOLVE

*ENDDO

CMSEL,ALL
BFEDELE,ALL,ALL
ALLSEL

TIME,TTIME
DELTIM,DT*51.jpg

2.jpg
shekhars.ip.17@nitj.ac.in is offline   Reply With Quote

Old   June 19, 2020, 17:50
Default Try CMSEL
  #7
New Member
 
Juan Daniel Trejos
Join Date: Feb 2020
Location: Monterrey, Mexico
Posts: 3
Rep Power: 2
Juan Daniel is on a distinguished road
My apologies for the delay, Y had many troubles using command BF because APDL identified the nodes but the program warned that they were not selected. I tried many ways to fix this warning message and I did it with de CMSEL Command.

Code:
	SF,NSURF,CONV,H,TAR
		CSYS,1000
		CMSEL,S,NSPOT
		BF,ALL,HGEN,%BEAM%
		!SF,NSPOT,HFLUX,%BEAM%
		ALLSEL,ALL				!SELECT ALL ENTITIES
If your trouble persist, send me warning message from ANSYS APDL.

Quote:
Originally Posted by shekhars.ip.17@nitj.ac.in View Post
Here is my code for two moving heat source one after one:-

C*** CONSTANTS DEFINITION

VOLT = 175 ! VOLTAGE (VOLTS)
CURR = 12.5 ! CURRENT (AMPERES)
EFF = 0.90 ! EFFICIENCY

VEL = 4E-3 ! WELDING SPEED (m/s)

Q = EFF*VOLT*CURR ! HEAT INPUT (W)

A = 5E-3 ! ELLIPSOID DIMENSIONS (m)
B = 2.5E-3
C1 = 8E-3
C2 = 10E-3

FF = 0.6 ! HEAT FRACTIONS
FR = 1.4

TAU = (C1/VEL) ! LAG FACTOR (s)
TTIME = 65 ! TOTAL TIME (s)
!!TIME_WELD = 56 ! WELDING TIME (s)
DT = 1 ! TIME INCREMENT (s)

PI = 3.14
EE = 2.718

C*** HEAT SOURCE

CMSEL,S,WELD_1 ! SELECT THE WELD COMPONENT

*GET,EMAX,ELEM,,NUM,MAX ! GET THE MAXIMUM ELEMENT NUMBER
*GET,EMIN,ELEM,,NUM,MIN ! GET THE MINIMUM ELEMENT NUMBER

ALLSEL

!!NPT = TIME_WELD/DT ! NUMBER OF LOADSTEPS 1

*DO,ii,1,28,1

WTIME = (ii/2)
TIME,WTIME

*DO,jj,EMIN,EMAX,1

CSYS,20
*GET,X,ELEM,jj,CENT,X
*GET,Y,ELEM,jj,CENT,Y
*GET,Z,ELEM,jj,CENT,Z

CSI = Y + (VEL*(TAU-WTIME))

*IF,(TAU-WTIME),GT,0,THEN

C = C1
F = FF

*ELSE

C = C2
F = FR

*ENDIF

PART1 = 6*(3**0.5)*F*Q/(A*B*C*PI*(PI**0.5))
PART2 = (EE**(-3*(X/A)**2))*(EE**(-3*(Z/B)**2))*(EE**(-3*(CSI/C)**2))
QF1 = PART1*PART2

BFE,jj,HGEN,,QF1

*ENDDO

SOLVE

*ENDDO

CMSEL,S,Substrate_1 ! SELECT THE WELD COMPONENT

*GET,EMAX,ELEM,,NUM,MAX ! GET THE MAXIMUM ELEMENT NUMBER
*GET,EMIN,ELEM,,NUM,MIN ! GET THE MINIMUM ELEMENT NUMBER

ALLSEL

*DO,uu,29,60,1

WTIME = (uu/2)
TIME,WTIME

*DO,kk,EMIN,EMAX,1

CSYS,30
*GET,X,ELEM,kk,CENT,X
*GET,Y,ELEM,kk,CENT,Y
*GET,Z,ELEM,kk,CENT,Z

CSI = Y + (VEL*(TAU-WTIME))

*IF,(TAU-WTIME),GT,0,THEN

C = C1
F = FF

*ELSE

C = C2
F = FR

*ENDIF

PART3 = 6*(3**0.5)*F*Q/(A*B*C*PI*(PI**0.5))
PART4 = (EE**(-3*(X/A)**2))*(EE**(-3*(Z/B)**2))*(EE**(-3*(CSI/C)**2))
QF2 = PART3*PART4

BFE,kk,HGEN,,QF2

*ENDDO

SOLVE

*ENDDO

CMSEL,ALL
BFEDELE,ALL,ALL
ALLSEL

TIME,TTIME
DELTIM,DT*5Attachment 77950

Attachment 77951
Juan Daniel is offline   Reply With Quote

Old   July 15, 2020, 20:20
Default
  #8
New Member
 
dharmik makwana
Join Date: Apr 2018
Location: india
Posts: 1
Rep Power: 0
dharmik_85i is on a distinguished road
Quote:
Originally Posted by shekhars.ip.17@nitj.ac.in View Post
Here is my code for two moving heat source one after one:-

C*** CONSTANTS DEFINITION

VOLT = 175 ! VOLTAGE (VOLTS)
CURR = 12.5 ! CURRENT (AMPERES)
EFF = 0.90 ! EFFICIENCY

VEL = 4E-3 ! WELDING SPEED (m/s)

Q = EFF*VOLT*CURR ! HEAT INPUT (W)

A = 5E-3 ! ELLIPSOID DIMENSIONS (m)
B = 2.5E-3
C1 = 8E-3
C2 = 10E-3

FF = 0.6 ! HEAT FRACTIONS
FR = 1.4

TAU = (C1/VEL) ! LAG FACTOR (s)
TTIME = 65 ! TOTAL TIME (s)
!!TIME_WELD = 56 ! WELDING TIME (s)
DT = 1 ! TIME INCREMENT (s)

PI = 3.14
EE = 2.718

C*** HEAT SOURCE

CMSEL,S,WELD_1 ! SELECT THE WELD COMPONENT

*GET,EMAX,ELEM,,NUM,MAX ! GET THE MAXIMUM ELEMENT NUMBER
*GET,EMIN,ELEM,,NUM,MIN ! GET THE MINIMUM ELEMENT NUMBER

ALLSEL

!!NPT = TIME_WELD/DT ! NUMBER OF LOADSTEPS 1

*DO,ii,1,28,1

WTIME = (ii/2)
TIME,WTIME

*DO,jj,EMIN,EMAX,1

CSYS,20
*GET,X,ELEM,jj,CENT,X
*GET,Y,ELEM,jj,CENT,Y
*GET,Z,ELEM,jj,CENT,Z

CSI = Y + (VEL*(TAU-WTIME))

*IF,(TAU-WTIME),GT,0,THEN

C = C1
F = FF

*ELSE

C = C2
F = FR

*ENDIF

PART1 = 6*(3**0.5)*F*Q/(A*B*C*PI*(PI**0.5))
PART2 = (EE**(-3*(X/A)**2))*(EE**(-3*(Z/B)**2))*(EE**(-3*(CSI/C)**2))
QF1 = PART1*PART2

BFE,jj,HGEN,,QF1

*ENDDO

SOLVE

*ENDDO

CMSEL,S,Substrate_1 ! SELECT THE WELD COMPONENT

*GET,EMAX,ELEM,,NUM,MAX ! GET THE MAXIMUM ELEMENT NUMBER
*GET,EMIN,ELEM,,NUM,MIN ! GET THE MINIMUM ELEMENT NUMBER

ALLSEL

*DO,uu,29,60,1

WTIME = (uu/2)
TIME,WTIME

*DO,kk,EMIN,EMAX,1

CSYS,30
*GET,X,ELEM,kk,CENT,X
*GET,Y,ELEM,kk,CENT,Y
*GET,Z,ELEM,kk,CENT,Z

CSI = Y + (VEL*(TAU-WTIME))

*IF,(TAU-WTIME),GT,0,THEN

C = C1
F = FF

*ELSE

C = C2
F = FR

*ENDIF

PART3 = 6*(3**0.5)*F*Q/(A*B*C*PI*(PI**0.5))
PART4 = (EE**(-3*(X/A)**2))*(EE**(-3*(Z/B)**2))*(EE**(-3*(CSI/C)**2))
QF2 = PART3*PART4

BFE,kk,HGEN,,QF2

*ENDDO

SOLVE

*ENDDO

CMSEL,ALL
BFEDELE,ALL,ALL
ALLSEL

TIME,TTIME
DELTIM,DT*5

Attachment 77950

Attachment 77951


I think for that you have to named selection that bead component and change location value for in do loop for I,j,k may be it works
dharmik_85i is offline   Reply With Quote

Reply

Tags
ansys apdl, fem, heat source

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2-way FSI in Ansys CFX 15 LucasGasparino CFX 3 August 6, 2015 03:17
Ansys Fluent analysis of heat exchanger MStudent FLUENT 2 April 20, 2015 08:40
Question about heat sources, 2D case modelling thomas. FLUENT 0 March 5, 2015 07:53
Ansys mechanical APDL problem. russogianluca90 ANSYS 0 October 13, 2014 07:38
Heat flux in ansys cfx juliom OpenFOAM Running, Solving & CFD 2 April 14, 2009 14:30


All times are GMT -4. The time now is 14:05.