Modelling Thermodynamic Entropy in Python

Dr Pankaj Dumka
Updated on 03-Oct-2023 15:16:27

584 Views

Entropy is a property of a thermodynamic system that remains constant during a reversible adiabatic process. Moreover, we can also say that it is the degree of randomness or disorder in the system. If a system exchanges dQ heat from its surroundings at temperature T, then the chance in the entropy can be written as − $$\mathrm{ds \: = \: \frac{dQ}{T} \dotso \dotso \: (1)}$$ According to Clausius' inequality the cyclic integral of $\mathrm{\frac{dQ}{T}}$ along a reversible path is either less or equal to zero. Mathematically, it can be written as − $$\mathrm{\oint\frac{dQ}{T} \: \leq \: 0\dotso \dotso \: (2)}$$ ... Read More

Replace List Elements with Its Ordinal Number in Python

Kalyan Mishra
Updated on 03-Oct-2023 15:15:47

328 Views

In this article we will learn how to replace any given list element with its ordinal number. We will see various methods to get this work done. Before that let’s know about ordinal numbers. Ordinal number − In mathematics we say ordinal number as number which represents the position or original order of list items present in a sequence. Take an example of a list: [ 6, 8, 5, 3 ] so ordinal value of these number would be − The first element (6) has ordinal value 1. The second element (8) has ordinal value 2. The third element ... Read More

Jacobian Matrix in PyTorch

Kalyan Mishra
Updated on 03-Oct-2023 15:13:34

398 Views

In this article we will learn about the Jacobian matrix and how to calculate this matrix using different methods in PyTorch. We use Jacobian matrix in various machine learning applications. Jacobian Matrix We use Jacobian matrix to calculate relation between the input and output variable. Jacobian matrix has all the partial derivatives of vector valued function. We can use this matrix in various applications machine learning applications. Here are some of its usages − For analyzing the gradients and derivatives of functions in multivariable calculus. Solving differential equations of systems. Calculating inverse of vector-values functions. Analyzing stability of dynamic ... Read More

Iterate Over Rows and Columns in Pandas DataFrame

Kalyan Mishra
Updated on 03-Oct-2023 15:08:48

270 Views

In this article we will learn about pandas, DataFrame and how we can iterate over rows and columns in the pandas DataFrame using various methods. Iteration is a basic operation we do when we have tabular data containing rows and columns. To install the pandas in the system execute the command in cmd. pip install pandas Method 1. Using Iterrows() Method. Example import pandas as pd df = pd.DataFrame({'Name': ['Kalyan', 'Gungun', 'Sona', 'Ram'], 'Age': [21, 20, 23, 23], 'Roll': [12, 13, 14, 15], 'Game': ['Cricket', 'Lodu', 'Chess', ... Read More

Find Summation of Random Numbers Using Python

Kalyan Mishra
Updated on 03-Oct-2023 15:00:10

791 Views

In this article we will learn about different methods to find the Summation of Random Numbers using Python language. In some scenarios we need to generate some random number and find its summation so we will see basic to improved versions of functions using which we can get this task done. Let’s see some methods to find the summation of random numbers. Method 1. Using Simple Loop Example import random n = 10 rand_nums = [] for _ in range(n): rand_nums.append(random.randint(1, 100)) total = sum(rand_nums) print("Random Numbers:", rand_nums) print("Summation of random numbers:", total) Output Random Numbers: ... Read More

Modeling the Trapezoidal Rule for Numerical Integration in Python

Dr Pankaj Dumka
Updated on 03-Oct-2023 14:56:35

2K+ Views

The purpose of integration (definite) is to calculate the area under a curve of a function between two limits, a and b. The plot shown below will clear this concept further. Quadrature, which is also commonly called as numerical integration, is a method for evaluating the area under the curve of a given function. The process is very simple i.e. first we dividing the bounded area into several regions or strips. Thereafter, the areas is evaluated with the help of mathematical formula of simple rectangle. Then the area of all strips is added to obtain the gross area under ... Read More

Modelling Stirling and Ericsson Cycles in Python

Dr Pankaj Dumka
Updated on 03-Oct-2023 14:52:26

308 Views

Stirling Cycle Four processes—two reversible isochoric and two reversible isothermal—make up the Stirling cycle. In the same temperature range, the efficiency of the ideal regenerative Stirling cycle is equivalent to that of the Carnot cycle. Heat interaction takes place throughout the cycle, whereas work interaction only happens in processes 1-2 and 3–4. The figure shown below displays the cycle's schematic. Maximum pressure $\mathrm{(p_{max})}$, minimum pressure $\mathrm{(p_{min})}$, maximum volume $\mathrm{(v_{max})}$, compression ratio (r), and adiabatic exponent $\mathrm{(\gamma)}$ are the input variables taken into consideration when modelling the cycle. The following list includes the thermodynamic calculations of several processes involved in ... Read More

Types of Integrated Circuits (ICs)

Manish Kumar Saini
Updated on 03-Oct-2023 14:48:44

3K+ Views

In this article, we will discuss different types of ICs (Integrated Circuits) in electronics. As we know, the integrated circuits (ICs) are one of the crucial parts of all electronic devices and systems. Without ICs, most of the hi tech electronic devices and gadgets that we use would cease to exist. Integrated circuits made the electronic devices and systems so small that they became an integral part of every field of human life. Therefore, integrated circuits or ICs are entirely responsible for miniaturization of electronic devices and circuits. Before discussing different types of ICs, let us first understand a ... Read More

Three Variable Function Using an 8-1 Multiplexer

Manish Kumar Saini
Updated on 03-Oct-2023 14:46:05

2K+ Views

Let's start this tutorial with a basic introduction of 8:1 multiplexer before moving on to cover how a three variable logic function can be implemented using an 8:1 multiplexer. Introduction to 8:1 Multiplexer A multiplexer (or MUX) is a digital logic circuit that accepts multiple data inputs and allows only one of them at a time to pass through the output line. Hence, multiplexer is also known as data selector. In other words, a multiplexer is a digital circuit which Based on the number of input data lines, there are several types of multiplexers. But, this article is meant ... Read More

Simplification of Boolean Expressions Using Boolean Algebra

Manish Kumar Saini
Updated on 03-Oct-2023 14:42:59

1K+ Views

Simplification is an approach in which a Boolean expression is minimized or reduced into an equivalent expression by using some Boolean identities. Boolean algebra is a mathematic applied to binary number system. It was developed by George Boole, an English mathematician, to simplify complex logical operation to their simplest form. The simplification of a Boolean function is important because it reduces the number of logic devices/gates required to implement a logic function. This in turn reduces the hardware cost and complexity of the circuit. Also, it increases the reliability of the system. In this tutorial, we will understand the ... Read More

Advertisements