# Adding Cards

In this section we will go over how to add the required cards to make the calculation function.

# Inputs

First thing we need to do is define all the inputs the user will need. We are trying to define the equation qx=kAΔTΔxq_x = {\frac {kA \Delta T} {\Delta x}}. To find qxq_x we need to define the inputs kk, AA, ΔT\Delta T and Δx\Delta x.

To add your first input, click the green plus icon below the outline card, this will display a dropdown of different types of cards you can add to your calculation. Click "Add an input" and then finally "Decimal number"

add input

This will add a decimal input card below the outline card.

empty input

We will fill this card in for ΔT\Delta T first

# Symbol

This field is used to define what symbol will be shown in reports when using this input. We can use any KaTex function here (opens new window), so to write ΔT\Delta T we will write {\Delta}T in this field.

# Units

The units defined here will be displayed whenever this input is used in your calculation. For ΔT\Delta T we will use the units °C\degree C. This field also accepts KaTex functions (opens new window) so we will write {\degree}C

# Report Value

The report value is an example value to use whilst you are working on your calculation. As the user of your calculation will be inputting their own value for this, they will never see what you put here. For this example we will use the value 10.

# Description

As with the outline card, the description is used to give context to what the input is doing. By default, it is set to A blank description, but we want to put something more useful than that. Set your description to Temperature difference over the body

# Repeat

Your page should now look like this
example page

That's one of the inputs defined, now we just have to do the same for the other three. Repeat the above steps for the other three variables using the values defined in the below table

Input Symbol Units Report Value Description
kk k W/(m{\degree}C) 70 Thermal Conductivity
AA A m^2 1 Heat transfer area
ΔT\Delta T {\Delta}T {\degree}C 10 Temperature difference over the body
Δx\Delta x {\Delta}x m 0.05 Distance of heat transfer

Once you have filled all this in you can make your calculation easier to read by clicking the "Collapse all cards button"
collapse
This will leave you with a calculation that looks something like this
input report

# Calculation

Now that we have all our required inputs defined, we can start to construct our calculation. To do this, we will click the green plus at the bottom of our calculation followed by 'Add a calculation' and then 'Calculate a variable'.
calculation dropdown

This will add a calculation card at the bottom of your calculation.

blank calculation

We will fill this card in for our calculation

# Symbol

This field is used to define what symbol will be shown in reports when using this calculated variable. We can use any KaTex function here (opens new window), so to write qxq_x we will write q_x in this field.

# Units

The units defined here will be displayed whenever this calculated variable is used in your calculation. For qxq_x we will use the units WW. so we will write W.

# Calculation

The calculation field is used to define how we calculate this variable. There are many available functions for this field that will help you to define your calculations accurately.

For our equation qx=kAΔTΔxq_x = {\frac {kA \Delta T} {\Delta x}}, we will define the calculation by using: (k*A*{\Delta}T)/{\Delta}x

# Description

The description is used to give context to what the calculated variable is doing. By default, it is set to A blank description, but we want to put something more useful than that. Set your description to Heat loss over the body

This should leave you with a calculation that looks like this
calculation report

# Result

Once you have completed your calculation you will want to return the result. This will ensure that when your calculation is being used i.e. in Excel, you will get a result returned to you.

To add your result, click the green plus icon at the bottom of your calculation, then you want to click "Add a result" and then finally "Calculated result"

add result

This will add a result card to the bottom of your calculation.

empty result

Finally, we just want to select the variable we just calculated from the dropdown list. Click "Variable symbol" and select "q_x".

complete calculation


You have now created your first calculation! In the next section we will go over how we can publish our calculation and use it on Arup Compute (opens new window)