> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fincept.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Calculate Van der Waals Gas Properties

> Calculates properties of a Van der Waals gas, a real gas model that includes molecular interactions and finite molecular size. Returns pressure, compressibility factor, and critical point parameters. The Van der Waals equation exhibits phase transitions and is used to model non-ideal behavior in physical and economic systems.

**Use Cases:**
- Model non-ideal market behavior (deviations from efficient markets)
- Phase transition modeling (market crashes, bubbles)
- Liquidity constraints (finite volume effects)
- Interaction effects between market participants
- Critical phenomena in financial systems

**Formula:** (P + a/V²)(V - b) = RT (for 1 mole)

**Credits:** 5 credits per request (Pro Tier) [Tier: ENTERPRISE, Credits: 10]



## OpenAPI

````yaml api-specs/physics.json post /quantlib/physics/thermodynamics/van-der-waals
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Physics Module
  description: >-
    Physics and Information Theory module for FinceptQuantLib API. Includes
    Shannon/Renyi/Tsallis entropy, KL/JS divergence, mutual information,
    transfer entropy, Fisher information, Boltzmann distribution, Ising model,
    maximum entropy, thermodynamics (free energy, Carnot cycle, van der Waals
    equation), and Maxwell relations. **Pro Tier required. 5 credits per
    request.**
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-physics
    description: Physics and Information Theory module for FinceptQuantLib API
    x-displayName: Physics
paths:
  /quantlib/physics/thermodynamics/van-der-waals:
    post:
      tags:
        - quantlib-physics
      summary: Calculate Van der Waals Gas Properties
      description: >-
        Calculates properties of a Van der Waals gas, a real gas model that
        includes molecular interactions and finite molecular size. Returns
        pressure, compressibility factor, and critical point parameters. The Van
        der Waals equation exhibits phase transitions and is used to model
        non-ideal behavior in physical and economic systems.


        **Use Cases:**

        - Model non-ideal market behavior (deviations from efficient markets)

        - Phase transition modeling (market crashes, bubbles)

        - Liquidity constraints (finite volume effects)

        - Interaction effects between market participants

        - Critical phenomena in financial systems


        **Formula:** (P + a/V²)(V - b) = RT (for 1 mole)


        **Credits:** 5 credits per request (Pro Tier) [Tier: ENTERPRISE,
        Credits: 10]
      operationId: van_der_waals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - a
                - b
                - temperature
                - volume
              properties:
                a:
                  type: number
                  description: Van der Waals parameter a (attractive interactions)
                  example: 0.1
                b:
                  type: number
                  description: Van der Waals parameter b (excluded volume)
                  example: 0.01
                'n':
                  type: number
                  description: Number of moles
                  default: 1
                  example: 1
                temperature:
                  type: number
                  description: Temperature (Kelvin)
                  example: 300
                volume:
                  type: number
                  description: Volume
                  example: 1
            examples:
              typical_gas:
                summary: Typical Van der Waals gas
                value:
                  a: 0.1
                  b: 0.01
                  'n': 1
                  temperature: 300
                  volume: 1
              high_pressure:
                summary: High pressure regime (small volume)
                value:
                  a: 0.2
                  b: 0.02
                  'n': 2
                  temperature: 350
                  volume: 0.5
      responses:
        '200':
          description: Van der Waals properties calculated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      pressure:
                        type: number
                        description: Pressure from Van der Waals equation
                        example: 2471.9
                      compressibility_factor:
                        type: number
                        description: >-
                          Compressibility factor Z = PV/(nRT) (Z=1 for ideal
                          gas)
                        example: 0.996
                      critical_point:
                        type: object
                        description: Critical point parameters
                        properties:
                          T_c:
                            type: number
                            description: Critical temperature
                            example: 300.3
                          P_c:
                            type: number
                            description: Critical pressure
                            example: 925.9
                          V_c:
                            type: number
                            description: Critical molar volume
                            example: 0.03
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientCreditsError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientCreditsError:
      description: Insufficient API credits
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Insufficient credits. This endpoint requires 5 credits.
    ValidationError:
      description: Request validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: array
                items:
                  type: object
                  properties:
                    loc:
                      type: array
                      items:
                        type: string
                    msg:
                      type: string
                    type:
                      type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````