cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Units problems with program block

CyrilD
4-Participant

Units problems with program block

Hello everyone,

 

I'm trying to program a 2D finite difference in time domain problem. However, I can't run the program, since the units do not seem to match. Has anyone an idea of how to disable these units or maybe could tell me what did I do wrong ? Because I don't know if I did mistakes in my program or if units stand as the only problem.

 

Thanks in advance !

 

Cyril

5 REPLIES 5
Werner_E
24-Ruby V
(To:CyrilD)

Look for example at your function k(). You are trying to add a dimensionless "d" and and expression with dimension temperature^2. That can't work.

CyrilD
4-Participant
(To:Werner_E)

d is just a coefficient imposed in the evolution of k with temperature, how could I defined it another way ?

Fred_Kohlhepp
23-Emerald I
(To:CyrilD)

You have to make unit balance.  Put correct units into your constants:

Capture.PNG

CyrilD
4-Participant
(To:Fred_Kohlhepp)

Thank you, I'm new to Mathcad, I didn't know you could force units like this.

 

Concerning this, does the [] implies a matrix and is it a problem to unity balance ? (think it shouldn't but...)

-MFra-
21-Topaz II
(To:CyrilD)

All constants and variables must be dimensionless or all with dimension. You can not just size some. You can not name a variable in the program, with the same name as the program. (Delta T is defined as a constant, instead in the program you use it as an indexed variable)

Top Tags