카테고리 없음2021. 6. 15. 12:16

ACT_NumPy_Ex3.xml

---------------------------------------------------------------------------------------------------------------

<extension version="192" minorversion="0" name="ACT_NumPy_Ex3">
    <guid shortid="ACT_NumPy_Ex3">98V1CB96-4EEE-4DF2-AA62-EC8F9838543A</guid>
    <author>SanthoshM</author>
    <description> Asd
    </description>
    <script src="main.py" compiled="true"/>
    <script src="A_NumpyFun3.py" compiled="true"/>
    <interface context="Mechanical">
        <images>images</images>
        <callbacks>
            <oninit>init</oninit>
        </callbacks>

        <toolbar name = "ACT_NumPy_Ex3" caption = "ACT_NumPy_Ex3">
            <entry name = "ACT_NumPy_Ex3" icon = "hand">
                <callbacks>
                    <onclick>CreateCustomPost</onclick>
                </callbacks>
            </entry>
        </toolbar>
    </interface>
    
    
        <simdata context ="Mechanical">
        
            <result name="CustomRes" version="1" caption="CustomNumPyRes" icon="hand" location="node" type="scalar" >
                <callbacks>
                    <evaluate>Manupulate</evaluate>
                </callbacks>
                
                <property name="Geometry" caption="Geometry" control="scoping"> </property>
                <property name="DispFactor" caption="DispFactor" control="float" default="5.0"> </property>
                <property name="InputFileName" caption="Input csv File Name" control="text" default="auto" readonly="true"> </property>
                <property name="OutputFileName" caption="Output csv File Name" control="text" default="auto" readonly="true"> </property>
                
            </result>
        
        </simdata>
        
</extension>

 

---------------------------------------------------------------------------------------------------------------

 

main3.py

 

---------------------------------------------------------------------------------------------------------------

https://stackoverflow.com/questions/66887591/ansys-ironpython-act-does-not-run

 

Ansys ironpython ACT does not run

I am trying to make the code work from the 9-17min mark in this youtube video: https://www.youtube.com/watch?v=oX5hDU0Qg-Q I wrote down every single line of code and it should work, however I get the

stackoverflow.com

 

def __init__(context): ExtAPI.Log.WriteMessage("initiating Scipy manipulate...") pass def CreateCustomPost(analysis): ExtAPI.Log.WriteMessage("clicked on CustomPost button") result=analysis.CreateResultObject("CustomPost")

Posted by 오늘보다 나은 내일
카테고리 없음2021. 6. 15. 11:06

import clr
import System
import os
clr.AddReferenceToFileAndPath("C:\\Program Files\\ANSYS Inc\\v201\\Addins\\ACT\\bin\\Win64\\MathNet.Numerics.dll")
 

# Example 1

import MathNet

from MathNet.Numerics.LinearAlgebra import *

V=Vector[System.Double].Build

M=Matrix[System.Double].Build

 

m = M.Random(3,4)

v = V.Random(3)

 

r=v*m

print r

 

# Example 2

import MathNet.Numerics.LinearAlgebra as la

 

from System import Array as sys_array

def array(*x): return sys_array[float](x) #float is equivalent to .Net double

 

A = la.Double.Matrix.Build.DenseOfRowArrays(

array(3, 2,-1),

array(2,-2,4),

array(-1,.5,-1)

)

 

b = la.Double.Vector.Build.DenseOfArray(array(1, -2, 0))

x = A.Solve(b)

 

print x

 

# Example 3

A1 = la.Double.Matrix.Build.DenseOfRowArrays(

array(3.0, 4.0, -1.0, 0.0),

array(4.0, 5.0, 0.0, -1.0),

array(5.0, 6.0, 0.0, 0.0),

array(6.0, 7.0, 0.0, 0.0)

)

b1 = la.Double.Vector.Build.DenseOfArray(array(0, 0, 20, 0))

x1 = A1.Solve(b1)

 

print x1

 

 

 

Posted by 오늘보다 나은 내일
카테고리 없음2020. 11. 4. 13:31

ACT


Create Fixed Support automatically with name selection that has 'fix' in it
num = ExtAPI.DataModel.Project.Model.NamedSelections.Children.Count
for ct in range(num):
   nmtmp = ExtAPI.DataModel.Project.Model.NamedSelections.Children[ct].Name   
   nm = nmtmp.lower() # lowercase for comparison
   if nm.find('fix')>=0:
      cker = nmtmp+' is fixed'   # found one that mets criteria
      print cker
      fixfix = ExtAPI.DataModel.Project.Model.Analyses[0].AddFixedSupport()
      fixfix.Location = ExtAPI.DataModel.Project.Model.NamedSelections.Children[ct]
      fixfix.Name = nmtmp+'_auto'

Posted by 오늘보다 나은 내일
카테고리 없음2019. 12. 12. 12:17

속성에서 "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -no-sandbox 로 변경

 

혹은 

 

호환성 탭에서 windows7 로 변경

Posted by 오늘보다 나은 내일
카테고리 없음2019. 9. 24. 10:47

GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

Posted by 오늘보다 나은 내일
카테고리 없음2019. 8. 2. 15:28

https://blog.techinline.com/2018/11/21/disable-microsoft-edge-and-internet-explorer-in-windows-10/

 

 Disable Microsoft Edge in Windows 10

  1. Go to C:\Windows\SystemApps.
  2. Locate the Microsoft Edge folder. Copy and save the name of the folder anywhere you like, as you might need it later on if you want to re-enable the app.
  3. Right-click the Microsoft Edge folder and rename it (you can give it any name you want).
  4. Click Continue. After this, Microsoft Edge should be disabled.

To re-enable the application, give the Microsoft Edge folder its original name back.

Posted by 오늘보다 나은 내일
카테고리 없음2018. 1. 3. 09:33

CFX Launcher --> Tool --> Command


cfx5cmds -read -def mydef.def -text mydef.txt  (transforms def file into text file)





Then Edit mydef.txt file 



THERMAL CONDUCTIVITY:

Option = Orthotropic Cartesian Components

Thermal Conductivity X Component = 1200[W m^-1 K^-1]

Thermal Conductivity Y Component = 1200 [W m^-1 K^-1]

Thermal Conductivity Z Component = 10 [W m^-1 K^-1]





Now apply modified txt file to def file 

 


cfx5cmds -write -def mydef.def -text mydef.txt 


Posted by 오늘보다 나은 내일
카테고리 없음2017. 8. 14. 10:33

Windows 설치를 사용하여 UEFI 기반 PC에 Windows를 설치할 경우 하드 드라이브 파티션 스타일은 UEFI 모드 또는 레거시 BIOS 호환 모드를 지원하도록 설정해야 합니다.

예를 들어 "이 디스크에 Windows를 설치할 수 없습니다. 선택한 디스크가 GPT 파티션 스타일이 아닙니다”라는 오류 메시지가 표시되는 것은 PC가 UEFI 모드에서 부팅되었지만 하드 드라이브가 UEFI 모드를 지원하도록 구성되지 않았기 때문입니다. 몇 가지 옵션이 있습니다.

  1. 레거시 BIOS 호환 모드에서 PC를 다시 부팅합니다. 이 옵션을 사용하면 기존 파티션 스타일을 유지할 수 있습니다. 자세한 내용은 UEFI 모드 또는 레거시 BIOS 모드로 부팅을 참조하세요.

  2. GPT 파티션 스타일을 사용하여 UEFI를 지원하도록 드라이브를 다시 포맷합니다. 이 옵션을 사용하면 PC의 UEFI 펌웨어 기능을 사용할 수 있습니다.

Windows 설치 내에서 Shift+F10을 눌러 명령 프롬프트 창을 엽니다.

드라이브를 다시 포맷합니다.

  • UEFI 모드: DiskPart를 사용하여 드라이브를 정리하고 GPT 파티션 스타일로 변환합니다.

    diskpart
    list disk
    select disk <disk number>
    clean
    convert gpt
    exit
    
  • 레거시 BIOS 호환 모드: DiskPart를 사용하여 드라이브를 정리하고 기본 파티션 스타일(MBR)을 사용합니다.

    diskpart
    list disk
    select disk <disk number>
    clean
    exit
    

이때 명령 프롬프트 창을 닫은 다음 Windows 설치 프로그램 설치를 계속할 수 있습니다.


출처 : https://msdn.microsoft.com/ko-kr/library/dn336946.aspx?f=255&MSPPError=-2147217396



Posted by 오늘보다 나은 내일
카테고리 없음2017. 5. 31. 10:43

http://www.ozeninc.com/apdl-arrays-tables-quickreference/



ARRAYS


array-cheatsheet_fig1



Arrays are a good way to hold vector or matrix data. As shown above, you can define arrays with the *DIM command. This defines the overall dimensions of the array (you can actually have up to 5 dimensions using special forms of the *DIM command, refer to the documentation for more). You can fill arrays yourself as below but I typically have ANSYS fill in arrays for me for postprocessing purposes, using commands like *VGET (to fill arrays prior to writing a file with *VWRITE) and VGET (sends time/frequency history curves from POST26 to arrays).

Below are examples of a vector and a matrix complete definition in APDL:

*dim,ntemp,array,3
ntemp(1) = -5.2, 25, 86.5
*dim,compstrs,array,4,2
compstrs(1,1) = 814, 1057, 1033, 786
compstrs(1,2) = -386, -704, -713, -348

TABLES

Did you know you can apply a curve or contour instead of a constant in many places in ANSYS? These can vary based on position, time, temperature and more. Tables are how this is accomplished. Tables are like arrays but with labels on the rows and columns that are not just the row/column number.

array-cheatsheet_fig2

As you can see, you can get some nice interpolation functionality very quickly. Just like arrays you can do this in up to 5 dimensions! Many times you will use a *DO loop to define arrays in terms of an expression as well.

The row/col/plane_var fields are for labeling your axis. If you intend to send a varying load or property later, this is where you tell it what it varies by. Check the *DIM command documentation for a list of what you can vary it by. For load or property commands like D and RMODIF, the documentation will need to say that you can pass a table and you do so by passing the table name enclosed in %’s as below. If you are using spatially varying loads, you probably will want to specify a custom coordinate system using the coord_sys_id field.

*dim,tab1d,table,5,,,time
tab1d(1) = 0,3,3.5,3.75,3.875
tab1d(1,0) = 0,0.25,0.5,0.75,1

! Apply time varying x displacement
d,component1,ux,%tab1d%
*dim,tab2d,table,5,3,,y,x,,13
tab2d(1,1) = 0,0.125,0.25,0.375,0.5
tab2d(1,2) = 0.05,0.175,0.3,0.425,0.55
tab2d(1,3) = 0.1,0.225,0.35,0.475,0.6
*taxis,tab2d(1,1),1,0,0.25,0.5,0.75,1
*taxis,tab2d(1,1),2,0,0.5,1

!Apply spatially varying temperature
!Aligned with coordinate system 13
d,component2,temp,%tab2d%

If you are like me, you may be slightly perturbed by the lack of units in the above plots. This is intentional. These commands are unitless, just like APDL. It is highly recommended that you set Analysis Settings -> Analysis Data Management -> Solver Units from Active System to the correct unit system for your APDL. Doing this will make sure that your unit system is consistent and will prevent several types of errors.

The list of available variables for tables is below:

PRIMARY VARIABLELABEL FOR VAR1, VAR2, VAR3
TimeTIME
FrequencyFREQ
X-coordinate locationX
Y-coordinate locationY
Z-coordinate locationZ
TemperatureTEMP
VelocityVELOCITY
PressurePRESSURE
Geometric gap/penetrationGAP
Cyclic sector numberSECTOR
Amplitude of the rotational velocity vectorOMEGS
EccentricityECCENT
Phase shiftTHETA


Posted by 오늘보다 나은 내일
카테고리 없음2017. 4. 12. 08:19

let us establish a relation among the elastic constants E,G and u. Consider a cube of material of side ‘a' subjected to the action of the shear and complementary shear stresses as shown in the figure and producing the strained shape as shown in the figure below.

Assuming that the strains are small and the angle A C B may be taken as 45deg



Posted by 오늘보다 나은 내일