카테고리 없음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 오늘보다 나은 내일
카테고리 없음2017. 2. 23. 10:39

Function is not defined for 'matlab.ui.Figure' inputs.   OTL....


Graphics Functions Return Objects, not Numeric Handles

I mentioned this briefly in Part 2 of this series. Graphics functions now return objects, not numeric handles. The R2014b documentation has detailed information about this subject in the section called Graphics Handles Are Now Objects, Not Doubles. I will give a couple of simple examples to illustrate what can happen with code written before R2014b.

Prior to R2014b, you could store a set of handles to graphics objects in an array and then add some numeric data to that array. In R2014b, that will cause an error.

x = -pi:0.1:pi ;
y1 = sin(x);
y2 = cos(x);
myLines = plot(x,y1,x,y2)    % plot returns an array of two Line objects

If you then try to set myLines(3) = 1.2, you get the following error.

  Cannot convert double value 1.2 to a handle

MATLAB won't let you add numeric values to an array of graphics objects. A similar problem occurs if you try to use an object handle in a function where MATLAB expects a numeric value. A simple example of this happens with the sprintf function.

a = sprintf('You clicked on figure %d\n', gcf);

The %d specification in the sprintf format string expects an integer value. However, since gcf is a figure object, you get the following error.

  Error using sprintf
  Function is not defined for 'matlab.ui.Figure' inputs.

Here is one final example. Because graphics handles used to be numbers, you could use them in logical expressions.

if (get(0, 'CurrentFigure'))
  disp(['Figure ' get(gcf, 'Name')'])    % display the figure name for gcf
else
  disp('No open figures')                % there is no open figure
end

This worked in earlier versions of MATLAB because get(0,'CurrentFigure') would return either an empty array or a numeric figure handle. Both of these values are valid in the logical test of the if statement above. In R2014b, this will cause an error.

  Conversion to logical from matlab.ui.Figure is not possible.

We have tried to maintain compatibility with previous releases in some cases. For example, you can still use 0 to refer to the graphics root in functions like get and set. As a best practice, however, we now recommend using the groot function to get the graphics root. Similarly, we still support the use of literal integer values to refer to figures in functions like setget, and figure. Again, the best practice is to use a variable which contains the object when using these functions.

If you find yourself really stuck, it is possible to cast object handles to numeric handles using the double function. You can then cast the number back to an object handle using the handle function. We don't recommend this as a long term solution. Be aware that we may choose to remove this feature in a future version of MATLAB. If we do, we'll let you know in advance.



Posted by 오늘보다 나은 내일